[][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.

Implementations

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 amount of variants in the enum.

pub fn field_count(&self) -> RSlice<'static, u8>

Notable traits for RSlice<'a, u8>

impl<'a> Read for RSlice<'a, u8>
[src]

Gets a slice with the amount 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 Clone for MonoTLEnum[src]

impl Copy for MonoTLEnum[src]

impl GetStaticEquivalent_ for MonoTLEnum[src]

type StaticEquivalent = _static_MonoTLEnum

impl Send for MonoTLEnum[src]

impl StableAbi for MonoTLEnum[src]

type IsNonZeroType = False

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

impl Sync for MonoTLEnum[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

type ROwned = T

The owned type, stored in RCow::Owned

type RBorrowed = &'a T

The borrowed type, stored in RCow::Borrowed

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

impl<T> GetWithMetadata for T[src]

type ForSelf = WithMetadata_<T, T>

This is always WithMetadata_<Self, Self>

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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, 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.

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

type Type = T

The same type as Self. Read more