pub fn new<E>(kind: ErrorKind, error: E) -> Self
    where
        E: Into<Box<dyn std::error::Error + Send + Sync>>,
    {
        Self {
            context: Context::Custom(Custom { kind, error: error.into() }),
        }
    }
/// Create a new `Error` based on a specific error kind and an underlying error cause
Create a new `Error` based on a specific error kind and an underlying error cause
Create a new ` Error ` based on a specific error kind and an underlying error cause
pub fn new<E>(kind: ErrorKind, error: E) -> Self
    where
        E: Into<Box<dyn std::error::Error + Send + Sync>>,
    {
        Self {
            context: Context::Custom(Custom { kind, error: error.into() }),
        }
    }
pub fn new < E > ( kind : ErrorKind , error : E ) -> Self where E : Into < Box < dyn std :: error :: Error + Send + Sync > > , { Self { context : Context :: Custom ( Custom { kind , error : error . into ( ) } ) , } }
Create a new `Error` based on a specific error kind and an underlying error cause
Create a new ` Error ` based on a specific error kind and an underlying error cause
kind
ErrorKind
error
E