Struct cbindgen::EnumConfig
source · pub struct EnumConfig {
pub rename_variants: Option<RenameRule>,
pub add_sentinel: bool,
pub prefix_with_name: bool,
pub derive_helper_methods: bool,
}
Expand description
Settings to apply to generated enums.
Fields§
§rename_variants: Option<RenameRule>
The rename rule to apply to the name of enum variants
add_sentinel: bool
Whether to add a Sentinel
value at the end of every enum
This is useful in Gecko for IPC serialization
prefix_with_name: bool
Whether the enum variants should be prefixed with the enum name
derive_helper_methods: bool
Whether to generate static ::X(..)
constructors and IsX()
methods for tagged enums.
Trait Implementations§
source§impl Clone for EnumConfig
impl Clone for EnumConfig
source§fn clone(&self) -> EnumConfig
fn clone(&self) -> EnumConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EnumConfig
impl Debug for EnumConfig
source§impl Default for EnumConfig
impl Default for EnumConfig
source§fn default() -> EnumConfig
fn default() -> EnumConfig
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for EnumConfigwhere
EnumConfig: Default,
impl<'de> Deserialize<'de> for EnumConfigwhere
EnumConfig: Default,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more