alef 0.114.2

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
pub enum Failure {
    Named { message: String, source: Option<String> },
    Hidden { source: Option<String> },
    Tuple(String, Option<String>),
}
fn selected(value: &Failure) -> Option<&str> {
    match value { {{ pattern }} => {{ selected }}, _ => Some("wrong variant") }
}
fn main() {
    assert_eq!(selected(&{{ value }}), {{ expected }});
}