Trait snafu::FromString

source ·
pub trait FromString {
    type Source;

    fn without_source(message: String) -> Self;
    fn with_source(source: Self::Source, message: String) -> Self;
}
Expand description

Takes a string message and builds the corresponding error.

It is expected that most users of SNAFU will not directly interact with this trait.

Required Associated Types§

The underlying error

Required Methods§

Create a brand new error from the given string

Wrap an existing error with the given string

Implementors§