[][src]Enum abi_stable::for_examples::ValidTag

#[repr(u8)]
#[non_exhaustive]pub enum ValidTag {
    Foo,
    Bar,
    Tag {
        name: RString,
        tag: RString,
    },
}

For demonstrating ffi-safe non-exhaustive enums.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Foo
Bar
Tag

Fields of Tag

name: RStringtag: RString

Implementations

impl ValidTag where
    Self: ValidTag_Bounds
[src]

pub fn Foo_NE() -> ValidTag_NE[src]

Constructs the ValidTag::Foo variant inside a NonExhaustive.

pub fn Bar_NE() -> ValidTag_NE[src]

Constructs the ValidTag::Bar variant inside a NonExhaustive.

pub fn Tag_NE(name: RString, tag: RString) -> ValidTag_NE[src]

Constructs the ValidTag::Tag variant inside a NonExhaustive.

Trait Implementations

impl Clone for ValidTag[src]

impl Debug for ValidTag[src]

impl GetEnumInfo for ValidTag[src]

type Discriminant = u8

The type of the discriminant.

type DefaultStorage = ValidTag_Storage

The default storage type, used to store this enum inside NonExhaustive<>, and allow the enum to grow in size in newer ABI compatible versions. Read more

type DefaultInterface = ValidTag_Interface

The default InterfaceType, used to determine the traits that are required when constructing a NonExhaustive<>, and are then usable afterwards. Read more

impl<__Storage> GetNonExhaustive<__Storage> for ValidTag[src]

type NonExhaustive = ValidTag_NEMarker<Self, __Storage>

The type whose type layout is used to represent this enum.

impl GetStaticEquivalent_ for ValidTag where
    ValidTag_NEMarker<Self, ValidTag_Storage>: GetStaticEquivalent_
[src]

impl PartialEq<ValidTag> for ValidTag[src]

impl StructuralPartialEq for ValidTag[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

impl<This> ValidTag_Bounds for This where
    This: Debug + Clone + PartialEq<This>, 
[src]