pub fn chain<S, E>(msg: S, cause: E) -> Error
    where
        S: Into<String>,
        E: std::error::Error + Send + Sync + 'static,
    {
        Error {
            msg: msg.into(),
            cause: Some(Arc::new(cause)),
        }
    }
/// Create a new error with cause.
Create a new error with cause.
Create a new error with cause .
pub fn chain<S, E>(msg: S, cause: E) -> Error
    where
        S: Into<String>,
        E: std::error::Error + Send + Sync + 'static,
    {
        Error {
            msg: msg.into(),
            cause: Some(Arc::new(cause)),
        }
    }
pub fn chain < S , E > ( msg : S , cause : E ) -> Error where S : Into < String > , E : std :: error :: Error + Send + Sync + ' static , { Error { msg : msg . into ( ) , cause : Some ( Arc :: new ( cause ) ) , } }
Create a new error with cause.
Create a new error with cause .
msg
S
cause
E
msg
S
cause
E