[][src]Struct abi_stable::type_layout::MonoTLEnum

#[repr(C)]
pub struct MonoTLEnum { /* fields omitted */ }

The parts of the layout of an enum,that don't depend on generic parameters.

Methods

impl MonoTLEnum[src]

pub const fn new(
    variant_names: StartLen,
    field_count: RSlice<'static, u8>,
    fields: CompTLFields
) -> Self
[src]

Constructs a MonoTLEnum.

pub fn variant_count(&self) -> usize[src]

Gets the ammount of variants in the enum.

Important traits for RSlice<'a, u8>
pub fn field_count(&self) -> RSlice<'static, u8>[src]

Gets a slice with the ammount of fields for each variant in the enum.

pub fn expand(
    self,
    other: GenericTLEnum,
    shared_vars: &'static SharedVars
) -> TLEnum
[src]

Expands this into a TLEnum,with all the properties of an enum definition.

Trait Implementations

impl GetStaticEquivalent_ for MonoTLEnum[src]

type StaticEquivalent = _static_MonoTLEnum

impl SharedStableAbi for MonoTLEnum[src]

type IsNonZeroType = False

Whether this type has a single invalid bit-pattern. Read more

type Kind = __ValueKind

The kind of abi stability of this type,there are 2: Read more

impl Send for MonoTLEnum[src]

impl Sync for MonoTLEnum[src]

impl Clone for MonoTLEnum[src]

impl Copy for MonoTLEnum[src]

Auto Trait Implementations

Blanket Implementations

impl<This> StableAbi for This where
    This: SharedStableAbi<Kind = ValueKind>, 
[src]

impl<This> TransmuteElement for This where
    This: ?Sized
[src]

impl<'a, T> BorrowOwned<'a> for T where
    T: 'a + Clone
[src]

type ROwned = T

type RBorrowed = &'a T

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> TypeIdentity for T where
    T: ?Sized
[src]

type Type = T

The same type as Self. Read more

impl<T> SelfOps for T where
    T: ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The error type returned when the conversion fails.