Derive Macro wrapped_mono::InteropRecive

source ·
#[derive(InteropRecive)]
Expand description

Autoimplement InteropRecive trait for any type containing only IteropRecive implementing memebers. Currently supports only structs, and trivial enums(C-like enums) of size less than u64(C# max enum size).

Rust enums

Can’t be used with rust-like enums(enums with non-value data), since there is no clear way how this should look like on the managed side.

Safety

When converting from C# checks only if value is in enum range between 0 and enum max val.

Enums

1 can have only values 2 have to have set values 3 have to be size smaller than u64, otherwise ‘evaluation of constant value failed’ error will be thrown(This error is thrown on purpose, since C# enums cant’ be bigger than u64. This message means your enum is to big and will cause problems).