// Walks the component graph, doing the operation implemented by `visitor` at
// each instance.
Walks the component graph, doing the operation implemented by `visitor` at
each instance.
Walks the component graph doing the operation implemented by ` visitor ` at each instance .
fn walk<V: ComponentInstanceVisitor>(
        &mut self,
        model: &Arc<ComponentModelForAnalyzer>,
        visitor: &mut V,
    ) -> Result<(), anyhow::Error> {
        self.initialize(model)?;
        let mut instance = model.get_root_instance()?;
        loop {
            visitor.visit_instance(&instance)?;
            match self.get_next_instance()? {
                Some(next) => instance = next,
                None => {
                    return Ok(());
                }
            }
        }
    }
fn walk < V : ComponentInstanceVisitor > ( & mut self , model : & Arc < ComponentModelForAnalyzer > , visitor : & mut V , ) -> Result < ( ) , anyhow :: Error > { self . initialize ( model ) ? ; let mut instance = model . get_root_instance ( ) ? ; loop { visitor . visit_instance ( & instance ) ? ; match self . get_next_instance ( ) ? { Some ( next ) => instance = next , None => { return Ok ( ( ) ) ; } } } }
Walks the component graph, doing the operation implemented by `visitor` at
each instance.
Walks the component graph doing the operation implemented by ` visitor ` at each instance .
&mut self
model
&Arc<ComponentModelForAnalyzer>
visitor
&mut V