pub trait WithInspectwhere
Self: Sized,{
// Required method
fn with_inspect(
self,
parent: &Node,
name: impl AsRef<str>,
) -> Result<Self, AttachError>;
}
Expand description
Extension trait for types that #[derive(Inspect)] (or implements
Inspect for &mut T
some other way), providing a convenient way of
attaching to inspect during construction. See the Inspect
trait for
more details.
Required Methods§
Sourcefn with_inspect(
self,
parent: &Node,
name: impl AsRef<str>,
) -> Result<Self, AttachError>
fn with_inspect( self, parent: &Node, name: impl AsRef<str>, ) -> Result<Self, AttachError>
Attaches self to the inspect tree. It is recommended to invoke this as part of construction. For example:
let yak = Yak::new().with_inspect(inspector.root(), "my_yak")?;
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.