pub trait WithInspect
where 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§

source

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")?;

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> WithInspect for T
where for<'a> &'a mut T: Inspect,