pub fn status(&self) -> ChildStatus {
        match self.state {
            ChildState::Init => ChildStatus::Degraded,
            ChildState::ConfigInvalid => ChildStatus::Faulted,
            ChildState::Closed => {
                if self.status_reasons.offline {
                    ChildStatus::Degraded
                } else {
                    ChildStatus::Faulted
                }
            }
            ChildState::Open => {
                if self.status_reasons.out_of_sync {
                    ChildStatus::Degraded
                } else if self.status_reasons.fatal_error {
                    ChildStatus::Faulted
                } else {
                    ChildStatus::Online
                }
            }
        }
    }
/// Status of the child
/// Init
/// Degraded as it cannot service IO, temporarily
///
/// ConfigInvalid
/// Faulted as it cannot ever service IO
///
/// Open
/// Degraded if temporarily out of sync
/// Online otherwise
///
/// Closed
/// Degraded if offline
/// otherwise Faulted as it cannot ever service IO
/// todo: better cater for the online/offline "states"
Status of the child
Init
Degraded as it cannot service IO, temporarily

ConfigInvalid
Faulted as it cannot ever service IO

Open
Degraded if temporarily out of sync
Online otherwise

Closed
Degraded if offline
otherwise Faulted as it cannot ever service IO
todo: better cater for the online/offline "states"
Status of the child Init Degraded as it cannot service IO temporarily ConfigInvalid Faulted as it cannot ever service IO Open Degraded if temporarily out of sync Online otherwise Closed Degraded if offline otherwise Faulted as it cannot ever service IO todo : better cater for the online / offline " states "
pub fn status(&self) -> ChildStatus {
        match self.state {
            ChildState::Init => ChildStatus::Degraded,
            ChildState::ConfigInvalid => ChildStatus::Faulted,
            ChildState::Closed => {
                if self.status_reasons.offline {
                    ChildStatus::Degraded
                } else {
                    ChildStatus::Faulted
                }
            }
            ChildState::Open => {
                if self.status_reasons.out_of_sync {
                    ChildStatus::Degraded
                } else if self.status_reasons.fatal_error {
                    ChildStatus::Faulted
                } else {
                    ChildStatus::Online
                }
            }
        }
    }
pub fn status ( & self ) -> ChildStatus { match self . state { ChildState :: Init => ChildStatus :: Degraded , ChildState :: ConfigInvalid => ChildStatus :: Faulted , ChildState :: Closed => { if self . status_reasons . offline { ChildStatus :: Degraded } else { ChildStatus :: Faulted } } ChildState :: Open => { if self . status_reasons . out_of_sync { ChildStatus :: Degraded } else if self . status_reasons . fatal_error { ChildStatus :: Faulted } else { ChildStatus :: Online } } } }
Status of the child
Init
Degraded as it cannot service IO, temporarily
Status of the child Init Degraded as it cannot service IO temporarily
&self
&self