errgo 0.1.4

generate enum variants inline
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use errgo::errgo;

#[errgo(attributes(
    #[repr(u8)] 
    #[must_use = "gotta use me"]
))]
fn foo() -> Result<(), FooError> {
    Err(err!(Bar))?;
    Ok(())
}

fn assert_foo_error(e: FooError) {
    e as u8;
}

fn main() {}