Enum bindgen::EnumVariation
source · pub enum EnumVariation {
Rust {
non_exhaustive: bool,
},
NewType {
is_bitfield: bool,
is_global: bool,
},
Consts,
ModuleConsts,
}
Expand description
A helper type that represents different enum variations.
Variants§
Rust
The code for this enum will use a Rust enum. Note that creating this in unsafe code (including FFI) with an invalid value will invoke undefined behaviour, whether or not its marked as non_exhaustive.
NewType
The code for this enum will use a newtype
Fields
Consts
The code for this enum will use consts
ModuleConsts
The code for this enum will use a module containing consts
Trait Implementations§
source§impl Clone for EnumVariation
impl Clone for EnumVariation
source§fn clone(&self) -> EnumVariation
fn clone(&self) -> EnumVariation
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 EnumVariation
impl Debug for EnumVariation
source§impl Default for EnumVariation
impl Default for EnumVariation
source§fn default() -> EnumVariation
fn default() -> EnumVariation
Returns the “default value” for a type. Read more
source§impl FromStr for EnumVariation
impl FromStr for EnumVariation
source§impl PartialEq for EnumVariation
impl PartialEq for EnumVariation
impl Copy for EnumVariation
impl Eq for EnumVariation
impl StructuralPartialEq for EnumVariation
Auto Trait Implementations§
impl Freeze for EnumVariation
impl RefUnwindSafe for EnumVariation
impl Send for EnumVariation
impl Sync for EnumVariation
impl Unpin for EnumVariation
impl UnwindSafe for EnumVariation
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more