alef 0.23.39

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11

unsafe impl IntoValueFromNative for {{ struct_name }} {}

impl magnus::TryConvert for {{ struct_name }} {
    fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
        let r: &{{ struct_name }} = <&{{ struct_name }} as magnus::TryConvert>::try_convert(val)?;
        Ok(r.clone())
    }
}

unsafe impl TryConvertOwned for {{ struct_name }} {}