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.
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.