alef 0.63.0

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
/// Convert a `{{ rust_path }}` error to a Python exception.
fn {{ fn_name }}(e: {{ rust_path }}) -> pyo3::PyErr {
    let msg = e.to_string();
    #[allow(unreachable_patterns)]
    match &e {
{% for arm in arms %}
        {{ arm }}
{% endfor %}
        {{ default_arm }}
    }
}