pub fn should_reconnect(&self) -> bool {
        match *self {
            // Should reconnect because it may be caused by temporary network errors.
            Error::PartialMessage => true,
            // Should reconnect because the underline socket is broken.
            Error::SocketBroken(_) => true,
            // Slave internal error, hope it recovers on reconnect.
            Error::SlaveInternalError => true,
            // Master internal error, hope it recovers on reconnect.
            Error::MasterInternalError => true,
            // Should just retry the IO operation instead of rebuilding the underline connection.
            Error::SocketRetry(_) => false,
            Error::InvalidParam | Error::InvalidOperation => false,
            Error::InvalidMessage | Error::IncorrectFds | Error::OversizedMsg => false,
            Error::SocketError(_) | Error::SocketConnect(_) => false,
            Error::FeatureMismatch => false,
            Error::ReqHandlerError(_) => false,
            Error::MemFdCreateError | Error::FileTrucateError | Error::MemFdSealError => false,
        }
    }
/// Determine whether to rebuild the underline communication channel.
Determine whether to rebuild the underline communication channel.
Determine whether to rebuild the underline communication channel .
pub fn should_reconnect(&self) -> bool {
        match *self {
            // Should reconnect because it may be caused by temporary network errors.
            Error::PartialMessage => true,
            // Should reconnect because the underline socket is broken.
            Error::SocketBroken(_) => true,
            // Slave internal error, hope it recovers on reconnect.
            Error::SlaveInternalError => true,
            // Master internal error, hope it recovers on reconnect.
            Error::MasterInternalError => true,
            // Should just retry the IO operation instead of rebuilding the underline connection.
            Error::SocketRetry(_) => false,
            Error::InvalidParam | Error::InvalidOperation => false,
            Error::InvalidMessage | Error::IncorrectFds | Error::OversizedMsg => false,
            Error::SocketError(_) | Error::SocketConnect(_) => false,
            Error::FeatureMismatch => false,
            Error::ReqHandlerError(_) => false,
            Error::MemFdCreateError | Error::FileTrucateError | Error::MemFdSealError => false,
        }
    }
pub fn should_reconnect ( & self ) -> bool { match * self { // Should reconnect because it may be caused by temporary network errors. Error :: PartialMessage => true , // Should reconnect because the underline socket is broken. Error :: SocketBroken ( _ ) => true , // Slave internal error, hope it recovers on reconnect. Error :: SlaveInternalError => true , // Master internal error, hope it recovers on reconnect. Error :: MasterInternalError => true , // Should just retry the IO operation instead of rebuilding the underline connection. Error :: SocketRetry ( _ ) => false , Error :: InvalidParam | Error :: InvalidOperation => false , Error :: InvalidMessage | Error :: IncorrectFds | Error :: OversizedMsg => false , Error :: SocketError ( _ ) | Error :: SocketConnect ( _ ) => false , Error :: FeatureMismatch => false , Error :: ReqHandlerError ( _ ) => false , Error :: MemFdCreateError | Error :: FileTrucateError | Error :: MemFdSealError => false , } }
Determine whether to rebuild the underline communication channel.
Determine whether to rebuild the underline communication channel .
&self
&self