Macro kgdata::pymirror

source ·
macro_rules! pymirror {
    ($pycls:ident (module = $module:literal, name = $name:literal, cls = $rustcls:ident $(, derive = ($( $derivetrait:ident ),*) )? ) {
        $(
            $( c($cel:ident) )? // c for copy
            $( b($bel:ident) )? // b for borrow
            $( r($oel:ident) )? // r for as_ref
        ),*
    }) => { ... };
}
Expand description

Generating a Python’s twin of a Rust’s type where each property of the Rust’s type is now a Python object to avoid conversion overhead.