pub(crate) async fn fault(&mut self, reason: Reason) {
        match reason {
            Reason::OutOfSync => {
                self.set_state(ChildState::Faulted(reason));
            }
            _ => {
                if let Err(e) = self.close().await {
                    error!(
                        "{}: child {} failed to close with error {}",
                        self.parent,
                        self.name,
                        e.verbose()
                    );
                }
                self.set_state(ChildState::Faulted(reason));
            }
        }
        NexusChild::save_state_change();
    }
/// Fault the child with a specific reason.
/// We do not close the child if it is out-of-sync because it will
/// subsequently be rebuilt.
Fault the child with a specific reason.
We do not close the child if it is out-of-sync because it will
subsequently be rebuilt.
Fault the child with a specific reason . We do not close the child if it is out - of - sync because it will subsequently be rebuilt .
pub(crate) async fn fault(&mut self, reason: Reason) {
        match reason {
            Reason::OutOfSync => {
                self.set_state(ChildState::Faulted(reason));
            }
            _ => {
                if let Err(e) = self.close().await {
                    error!(
                        "{}: child {} failed to close with error {}",
                        self.parent,
                        self.name,
                        e.verbose()
                    );
                }
                self.set_state(ChildState::Faulted(reason));
            }
        }
        NexusChild::save_state_change();
    }
pub ( crate ) async fn fault ( & mut self , reason : Reason ) { match reason { Reason :: OutOfSync => { self . set_state ( ChildState :: Faulted ( reason ) ) ; } _ => { if let Err ( e ) = self . close ( ) . await { error ! ( " " self parent self name e verbose ( ) ) ; } self . set_state ( ChildState :: Faulted ( reason ) ) ; } } NexusChild :: save_state_change ( ) ; }
Fault the child with a specific reason.
Fault the child with a specific reason .
&mut self
reason
Reason