[][src]Struct abi_stable::type_layout::TLDiscriminants

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

The discriminants of an enum.

Methods

impl TLDiscriminants[src]

pub const fn from_u8_slice(arr: RSlice<'static, u8>) -> Self[src]

Constructs the variant from an RSlice<'static,u8>.

pub const fn from_i8_slice(arr: RSlice<'static, i8>) -> Self[src]

Constructs the variant from an RSlice<'static,i8>.

pub const fn from_u16_slice(arr: RSlice<'static, u16>) -> Self[src]

Constructs the variant from an RSlice<'static,u16>.

pub const fn from_i16_slice(arr: RSlice<'static, i16>) -> Self[src]

Constructs the variant from an RSlice<'static,i16>.

pub const fn from_u32_slice(arr: RSlice<'static, u32>) -> Self[src]

Constructs the variant from an RSlice<'static,u32>.

pub const fn from_i32_slice(arr: RSlice<'static, i32>) -> Self[src]

Constructs the variant from an RSlice<'static,i32>.

pub const fn from_u64_slice(arr: RSlice<'static, u64>) -> Self[src]

Constructs the variant from an RSlice<'static,u64>.

pub const fn from_i64_slice(arr: RSlice<'static, i64>) -> Self[src]

Constructs the variant from an RSlice<'static,i64>.

pub const fn from_usize_slice(arr: RSlice<'static, usize>) -> Self[src]

Constructs the variant from an RSlice<'static,usize>.

pub const fn from_isize_slice(arr: RSlice<'static, isize>) -> Self[src]

Constructs the variant from an RSlice<'static,isize>.

pub fn discriminant_repr(&self) -> DiscriminantRepr[src]

Gets the type of a discriminant in this TLDiscriminants.

pub fn compare(&self, other: &Self) -> Result<(), RVec<AbiInstability>>[src]

Compares this TLDiscriminants with another,

Errors

This returns errors if:

  • The discriminant is of a different type

  • The value of the discriminants is different.

Trait Implementations

impl Clone for TLDiscriminants[src]

impl Copy for TLDiscriminants[src]

impl Debug for TLDiscriminants[src]

impl Eq for TLDiscriminants[src]

impl GetStaticEquivalent_ for TLDiscriminants[src]

type StaticEquivalent = _static_TLDiscriminants

impl PartialEq<TLDiscriminants> for TLDiscriminants[src]

impl SharedStableAbi for TLDiscriminants[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

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

type RBorrowed = &'a T

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

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

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

impl<This> StableAbi for This where
    This: SharedStableAbi<Kind = ValueKind>, 
[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