inspect_writable

Trait InspectWritableNode

Source
pub trait InspectWritableNode<T: InspectWritable> {
    // Required methods
    fn new(data: &T, node: Node) -> Self;
    fn update(&self, data: &T);
    fn inspect_node(&self) -> &Node;
}
Expand description

A wrapper around an Inspect node and a collection of inspect fields. These fields are created and may updated using the contents of an InspectWritable struct. A struct implementing InspectWritableNode is automatically generated when the InspectWritable trait is derived.

Required Methods§

Source

fn new(data: &T, node: Node) -> Self

Create a new instance, wrapping the supplied node. Inspect fields are created with names matching those in the InspectWritable struct and initialized to the values in data.

Source

fn update(&self, data: &T)

Updates all inspect fields to the values in data.

Source

fn inspect_node(&self) -> &Node

Returns a reference to the wrapped inspect Node.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§