#error #composite #enums #io-error #composed

composite-error

easily create a enum error composed of other errors

1 unstable release

0.1.0 Aug 25, 2020

#17 in #composite

MIT license

4KB
51 lines

Create a simple error enum that is a composite of other errors.

composite_error! {
    MyError {
        IoError: std::io::Error,
        Other: String,
    }
}

let e = MyError::Other("This is an error".into());
println!("{}", e);

No runtime deps