[]Struct abi_stable::type_layout::LifetimeRange

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

Either a LifetimeArray or a range into a slice of LifetimePairs.

Methods

impl LifetimeRange

pub const EMPTY: Self

An empty LifetimeRange.

pub const BIT_SIZE: u32

The ammount of bits used to represent a LifetimeRnage.

pub const MAX_START: usize

The maximum value for the start of a range.

pub const MAX_LEN: usize

The maximum length of a range.

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

Constructs a LifetimeRange from a single lifetime parameter.

pub const fn from_array(lia: [LifetimeIndex; 5]) -> Self

Constructs a LifetimeRange from an array of 5 lifetime indices.

pub const fn from_range(range: Range<usize>) -> Self

Constructs a LifetimeRange from a range.

pub fn len(self) -> usize

The ammount of lifetime indices this spans.

pub const fn is_range(self) -> bool

Whether this is a range into a slice of LifetimePairs.

pub const fn to_u21(self) -> u32

Converts this LifetimeRange into its representation

pub const fn from_u21(bits: u32) -> Self

Constructs this LifetimeRange from its representation

impl LifetimeRange[src]

pub fn slicing(
    self,
    lifetime_indices: &[LifetimeIndexPair]
) -> LifetimeArrayOrSlice
[src]

Trait Implementations

impl Clone for LifetimeRange

impl Copy for LifetimeRange

impl Debug for LifetimeRange

impl Eq for LifetimeRange

impl GetStaticEquivalent_ for LifetimeRange[src]

type StaticEquivalent = _static_LifetimeRange

impl Ord for LifetimeRange

impl PartialEq<LifetimeRange> for LifetimeRange

impl PartialOrd<LifetimeRange> for LifetimeRange

impl SharedStableAbi for LifetimeRange[src]

type IsNonZeroType = <u32 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 StructuralEq for LifetimeRange

impl StructuralPartialEq for LifetimeRange

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<This> GetConstGenericVTable for This where
    This: StableAbi + Eq + PartialEq<This> + Debug + Send + Sync
[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