foreign_enum!
Through the usage of the foreign_enum!
macro you can "export" enum
s (C
like enum) to a foreign language:
#[derive(Clone, Copy)]
enum MyEnum {
Item1,
Item2,
Item3,
}
foreign_enum!(
enum MyEnum {
ITEM1 = MyEnum::Item1,
ITEM2 = MyEnum::Item2,
ITEM3 = MyEnum::Item3,
}
);
This allows you to use it as input or output types for foreign_class!
methods.