alef 0.25.21

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
fn nodecontext_to_elixir_map<'a>(
    env: rustler::Env<'a>,
    ctx: &{{ context_type_path }},
) -> rustler::Term<'a> {
    let mut pairs: Vec<(rustler::Term<'a>, rustler::Term<'a>)> = Vec::new();
{{ context_field_lines }}
    rustler::Term::map_from_pairs(env, &pairs).unwrap_or_else(|_| rustler::types::atom::Atom::from_str(env, "nil").unwrap().to_term(env))
}