[][src]Struct abi_stable::type_layout::tagging::Tag

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

Tag is a dynamically typed data structure used to encode extra properties about a type in its layout constant.

For more information look at the module-level documentation

Implementations

impl Tag[src]

pub const NULL: &'static Tag[src]

pub const fn null() -> Self[src]

Constructs the Null variant.

pub const fn bool_(b: bool) -> Self[src]

Constructs the Bool variant.

pub const fn int(n: i64) -> Self[src]

Constructs the Int variant.

pub const fn uint(n: u64) -> Self[src]

Constructs the UInt variant.

pub const fn str(s: &'static str) -> Self[src]

Constructs the String_ variant.

pub const fn rstr(s: RStr<'static>) -> Self[src]

Constructs the String_ variant.

pub const fn ignored(ignored: &'static Tag) -> Self[src]

Constructs the Ignored variant.

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

Constructs the Array variant.

pub const fn set(s: RSlice<'static, Tag>) -> Self[src]

Constructs the Set variant.

pub const fn kv(key: Tag, value: Tag) -> KeyValue<Tag>[src]

Constructs a KeyValue.

pub const fn map(s: RSlice<'static, KeyValue<Tag>>) -> Self[src]

Constructs the Map variant.

impl Tag[src]

pub fn to_checkable(self) -> CheckableTag[src]

Converts the Tag into a CheckableTag, so as to check Tags for compatibility.

Trait Implementations

impl Clone for Tag[src]

impl Copy for Tag[src]

impl Debug for Tag[src]

impl Display for Tag[src]

impl Eq for Tag[src]

impl ExtraChecks for Tag[src]

impl GetStaticEquivalent_ for Tag[src]

type StaticEquivalent = _static_Tag

impl Hash for Tag[src]

impl Ord for Tag[src]

impl PartialEq<Tag> for Tag[src]

impl PartialOrd<Tag> for Tag[src]

impl StableAbi for Tag[src]

type IsNonZeroType = False

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

impl StructuralEq for Tag[src]

impl StructuralPartialEq for Tag[src]

Auto Trait Implementations

impl RefUnwindSafe for Tag

impl Send for Tag

impl Sync for Tag

impl Unpin for Tag

impl UnwindSafe for Tag

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<_Self> ExtraChecks_Bounds for _Self where
    _Self: ExtraChecks + 'static, 
[src]

impl<This> ForExtraChecksImplementor for This where
    This: StableAbi + ExtraChecks + ?Sized
[src]

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<T> ToString for T where
    T: Display + ?Sized
[src]

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]