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
sourceimpl Clone for EnumConfig
impl Clone for EnumConfig
sourcefn clone(&self) -> EnumConfig
fn clone(&self) -> EnumConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for EnumConfig
impl Debug for EnumConfig
sourceimpl Default for EnumConfig
impl Default for EnumConfig
sourcefn default() -> EnumConfig
fn default() -> EnumConfig
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for EnumConfigwhere
EnumConfig: Default,
impl<'de> Deserialize<'de> for EnumConfigwhere
EnumConfig: Default,
sourcefn 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
Auto Trait Implementations
impl RefUnwindSafe for EnumConfig
impl Send for EnumConfig
impl Sync for EnumConfig
impl Unpin for EnumConfig
impl UnwindSafe for EnumConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more