Trait fuchsia_inspect_derive::WithInspect
source · 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")?;
Object Safety§
This trait is not object safe.