pub async fn offline_child(
        &mut self,
        name: &str,
    ) -> Result<NexusStatus, Error> {
        trace!("{}: Offline child request for {}", self.name, name);

        let cancelled_rebuilding_children =
            self.cancel_child_rebuild_jobs(name).await;

        if let Some(child) = self.children.iter_mut().find(|c| c.name == name) {
            child.offline().await;
        } else {
            return Err(Error::ChildNotFound {
                name: self.name.clone(),
                child: name.to_owned(),
            });
        }

        self.reconfigure(DREvent::ChildOffline).await;
        self.start_rebuild_jobs(cancelled_rebuilding_children).await;

        Ok(self.status())
    }
/// offline a child device and reconfigure the IO channels
offline a child device and reconfigure the IO channels
offline a child device and reconfigure the IO channels
pub async fn offline_child(
        &mut self,
        name: &str,
    ) -> Result<NexusStatus, Error> {
        trace!("{}: Offline child request for {}", self.name, name);
        let cancelled_rebuilding_children =
            self.cancel_child_rebuild_jobs(name).await;
        if let Some(child) = self.children.iter_mut().find(|c| c.name == name) {
            child.offline().await;
        } else {
            return Err(Error::ChildNotFound {
                name: self.name.clone(),
                child: name.to_owned(),
            });
        }
        self.reconfigure(DREvent::ChildOffline).await;
        self.start_rebuild_jobs(cancelled_rebuilding_children).await;
        Ok(self.status())
    }
pub async fn offline_child ( & mut self , name : & str , ) -> Result < NexusStatus , Error > { trace ! ( " " self name name ) ; let cancelled_rebuilding_children = self . cancel_child_rebuild_jobs ( name ) . await ; if let Some ( child ) = self . children . iter_mut ( ) . find ( | c | c . name == name ) { child . offline ( ) . await ; } else { return Err ( Error :: ChildNotFound { name : self . name . clone ( ) , child : name . to_owned ( ) , } ) ; } self . reconfigure ( DREvent :: ChildOffline ) . await ; self . start_rebuild_jobs ( cancelled_rebuilding_children ) . await ; Ok ( self . status ( ) ) }
offline a child device and reconfigure the IO channels
offline a child device and reconfigure the IO channels
&mut self
name
&str