/// Perform the node initialization and begin running the PowerManager.
Perform the node initialization and begin running the PowerManager.
Perform the node initialization and begin running the PowerManager .
pub async fn run(&mut self) -> Result<(), Error> {
        // Create a new ServiceFs to incoming handle service requests for the various services that
        // the PowerManager hosts.
        let mut fs = ServiceFs::new_local();
        // Required call to serve the inspect tree
        let inspector = component::inspector();
        inspector.serve(&mut fs)?;
        // Create the nodes according to the config file
        self.create_nodes_from_config(&mut fs).await?;
        // Allow our services to be discovered.
        fs.take_and_serve_directory_handle()?;
        // Run the ServiceFs (handles incoming request streams). This future never completes.
        fs.collect::<()>().await;
        Ok(())
    }
pub async fn run ( & mut self ) -> Result < ( ) , Error > { // Create a new ServiceFs to incoming handle service requests for the various services that // the PowerManager hosts. let mut fs = ServiceFs :: new_local ( ) ; // Required call to serve the inspect tree let inspector = component :: inspector ( ) ; inspector . serve ( & mut fs ) ? ; // Create the nodes according to the config file self . create_nodes_from_config ( & mut fs ) . await ? ; // Allow our services to be discovered. fs . take_and_serve_directory_handle ( ) ? ; // Run the ServiceFs (handles incoming request streams). This future never completes. fs . collect :: < ( ) > ( ) . await ; Ok ( ( ) ) }
Perform the node initialization and begin running the PowerManager.
Perform the node initialization and begin running the PowerManager .
&mut self