thisctx 0.4.0

Easily create error with contexts
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use thisctx::{IntoError, WithContext};

#[derive(Debug, WithContext)]
#[thisctx(no_unit)]
enum Error {
    NotUnit(),
    #[thisctx(unit)]
    Unit(),
}

#[test]
fn attr_no_unit() {
    NotUnit().build();
    Unit.build();
}