alef 0.77.0

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
    /// <summary>Creates a new <see cref="{{ class_name }}"/> handle.</summary>
    public static {{ class_name }} Create({{ param_list }})
    {
        var handle = NativeMethods.{{ native_method }}({{ call_args }});
        if (handle == 0)
        {
            throw {{ exception_name }}.FromLastError("Create failed");
        }
        return new {{ class_name }}(handle);
    }