[]Struct abi_stable::type_layout::LifetimeIndex

#[repr(transparent)]
pub struct LifetimeIndex { /* fields omitted */ }

Which lifetime is being referenced by a field. Allows lifetimes to be renamed,so long as the "same" lifetime is being referenced.

Methods

impl LifetimeIndex

pub const NONE: Self

A sentinel value to represent the absence of a lifetime.

Making this be all zeroes allows using u32::leading_zeros to calculate the length of LifetimeIndexArray .

pub const ANONYMOUS: Self

A lifetime parameter in a function pointer that is only used once, and does not appear in the return type.

pub const STATIC: Self

A static lifetime.

pub const MAX_LIFETIME_PARAM: u8

pub const fn Param(index: u8) -> LifetimeIndex

Constructs a LifetimeIndex to the nth lifetime parameter of a type.

pub fn to_param(self) -> Option<u8>

Gets which lifetiem parameter this is. Returns None if it's not a lifetime parameter.

pub const fn from_u4(bits: u8) -> Self

Constructs a LifetimeIndex from its representation.

pub const fn to_u4(self) -> u8

Converts a LifetimeIndex into its representation.

Trait Implementations

impl GetStaticEquivalent_ for LifetimeIndex[src]

type StaticEquivalent = _static_LifetimeIndex

impl SharedStableAbi for LifetimeIndex[src]

type IsNonZeroType = <u8 as __SharedStableAbi>::IsNonZeroType

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 Clone for LifetimeIndex

impl Copy for LifetimeIndex

impl Eq for LifetimeIndex

impl PartialEq<LifetimeIndex> for LifetimeIndex

impl Display for LifetimeIndex[src]

impl Debug for LifetimeIndex

Auto Trait Implementations

Blanket Implementations

impl<This> GetConstGenericVTable for This where
    This: StableAbi + Eq + PartialEq<This> + Debug + Send + Sync
[src]

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> ToString for T where
    T: Display + ?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> 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.