macro_rules! impl_ctor_dtor {
    (
        $t:ident,
        $ctor:ident ( $( $x:ident: $y:ty ),* ),
        $dtor:ident,
    ) => { ... };
}
Expand description

This helper macro implements the C API’s constructor/destructor for a given type. Because they all follow the same pattern and include lots of boilerplate unsafe code, it makes sense to write it once with this helper macro.