/// Creates a new stats node as a child of `parent` that will expose the given `Inspector`
/// stats.
Creates a new stats node as a child of `parent` that will expose the given `Inspector`
stats.
Creates a new stats node as a child of ` parent ` that will expose the given ` Inspector ` stats .
pub fn new(inspector: &Inspector, parent: &super::Node) -> Self {
        let weak_root_node = inspector.root().clone_weak();
        let lazy_node = parent.create_lazy_child(FUCHSIA_INSPECT_STATS, move || {
            let root_node = weak_root_node.clone_weak();
            async move {
                let inspector = Inspector::new();
                if let Some(state) = root_node.state() {
                    write_stats(&state, inspector.root());
                }
                Ok(inspector)
            }
            .boxed()
        });
        Self { inner: lazy_node }
    }
pub fn new ( inspector : & Inspector , parent : & super :: Node ) -> Self { let weak_root_node = inspector . root ( ) . clone_weak ( ) ; let lazy_node = parent . create_lazy_child ( FUCHSIA_INSPECT_STATS , move | | { let root_node = weak_root_node . clone_weak ( ) ; async move { let inspector = Inspector :: new ( ) ; if let Some ( state ) = root_node . state ( ) { write_stats ( & state , inspector . root ( ) ) ; } Ok ( inspector ) } . boxed ( ) } ) ; Self { inner : lazy_node } }
Creates a new stats node as a child of `parent` that will expose the given `Inspector`
stats.
Creates a new stats node as a child of ` parent ` that will expose the given ` Inspector ` stats .
inspector
&Inspector
parent
&super::Node