[−][src]Struct cbindgen::EnumConfig
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.
derive_const_casts: bool
Whether to generate AsX() const
methods for tagged enums.
derive_mut_casts: bool
Whether to generate AsX()
methods for tagged enums.
cast_assert_name: Option<String>
The name of the macro to use for derive_{const,mut}casts
. If custom, you're
responsible to provide the necessary header, otherwise assert
will be
used, and <cassert>
will be included.
must_use: Option<String>
The way to annotation this enum as #[must_use].
derive_tagged_enum_destructor: bool
Whether to generate destructors of tagged enums.
derive_tagged_enum_copy_constructor: bool
Whether to generate copy-constructors of tagged enums.
derive_tagged_enum_copy_assignment: bool
Whether to generate copy-assignment operators of tagged enums.
This is only generated if a copy constructor for the same tagged enum is generated as well.
enum_class: bool
Declare the enum as an enum class. Only relevant when targeting C++.
private_default_tagged_enum_constructor: bool
Whether to generate empty, private default-constructors for tagged enums.
Trait Implementations
impl Clone for EnumConfig
[src]
fn clone(&self) -> EnumConfig
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for EnumConfig
[src]
impl Default for EnumConfig
[src]
fn default() -> EnumConfig
[src]
impl<'de> Deserialize<'de> for EnumConfig where
EnumConfig: Default,
[src]
EnumConfig: Default,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,