pub fn with_message<F, C>(kind: ErrorKind, message: F) -> Self
    where
        Self: Sized,
        F: FnOnce() -> C,
        C: Into<Cow<'static, str>>,
    {
        Self {
            context: Context::Message {
                kind,
                message: message().into(),
            },
        }
    }
/// Creates an `Error` based on an error kind and formatted message
Creates an `Error` based on an error kind and formatted message
Creates an ` Error ` based on an error kind and formatted message
pub fn with_message<F, C>(kind: ErrorKind, message: F) -> Self
    where
        Self: Sized,
        F: FnOnce() -> C,
        C: Into<Cow<'static, str>>,
    {
        Self {
            context: Context::Message {
                kind,
                message: message().into(),
            },
        }
    }
pub fn with_message < F , C > ( kind : ErrorKind , message : F ) -> Self where Self : Sized , F : FnOnce ( ) -> C , C : Into < Cow < ' static , str > > , { Self { context : Context :: Message { kind , message : message ( ) . into ( ) , } , } }
Creates an `Error` based on an error kind and formatted message
Creates an ` Error ` based on an error kind and formatted message
kind
ErrorKind
message
F