macro_rules! ffi_enum {
(
$(#[$meta:meta])*
$vis:vis enum $name:ident : $raw:ty {
$( $(#[$vmeta:meta])* $variant:ident = $value:path ),+ $(,)?
}
) => { ... };
}Expand description
Declares a Rust enum mirroring a C enum, together with From/TryFrom
conversions to and from the raw type.
ⓘ
ffi_enum! {
/// Docs.
pub enum NeighborMode: igraph_neimode_t {
/// Out-neighbors.
Out = igraph_neimode_t_IGRAPH_OUT,
}
}