alef 0.79.5

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
if this == 0 {
    set_last_error(ALEF_INVALID_HANDLE_ERROR, "zero is not a valid handle");
    {{ fail_ret }}
}
let snapshot_ptr = match locked_handle_ptr::<{{ handle_qualified }}>(&mut __alef_guards, this) {
    Ok(value) => value,
    Err(error) => { set_handle_error(&error); {{ fail_ret }} }
};
// SAFETY: the registry entry guard remains held for the duration of this call.
let snapshot = unsafe { &*snapshot_ptr };
let obj: {{ qualified }} = match serde_json::from_str(&snapshot.json) {
    Ok(value) => value,
    Err(error) => { set_last_error(2, &error.to_string()); {{ fail_ret }} }
};