Trait inspect_writable::InspectWritable
source · pub trait InspectWritable: Sized {
type NodeType: InspectWritableNode<Self>;
// Required methods
fn create(&self, node: Node) -> Self::NodeType;
fn record(&self, node: &Node);
}
Expand description
A datatype that may be written to an inspect type. This trait can be automatically derived for
structs composed of inspect-compatible fields, i.e. signed integers, unsigned integers, or types
implementing the Debug
trait.
Required Associated Types§
sourcetype NodeType: InspectWritableNode<Self>
type NodeType: InspectWritableNode<Self>
The wrapper type returned from create
calls.
Required Methods§
sourcefn create(&self, node: Node) -> Self::NodeType
fn create(&self, node: Node) -> Self::NodeType
Writes the contents of the struct into inspect fields on the supplied node. Field names
match the fields in the struct. This function uses the create*
methods in the inspect
API and returns an InspectWriteableNode
that may be used to update the fields in the
future.
Object Safety§
This trait is not object safe.