Attribute Macro interoptopus_proc::ffi_constant [−][src]
#[ffi_constant]
Expand description
Enables a const
to appear in generated bindings.
This will derive ConstantInfo
for a helper struct of the
same name containing the const’s name and value.
Constant evaluation is supported.
In order to appear in generated bindings the constant has to be mentioned in the definition
of the libaries inventory_function!()
.
Examples
use interoptopus::ffi_constant; #[ffi_constant] const SOME_CONST: u32 = 314; #[ffi_constant] const COMPUTED_CONST: u8 = double(12); // will export 24