[][src]Struct abi_stable::type_layout::LifetimeRange

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

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

Implementations

impl LifetimeRange[src]

pub const EMPTY: Self[src]

An empty LifetimeRange.

pub const BIT_SIZE: u32[src]

The amount of bits used to represent a LifetimeRnage.

pub const MAX_START: usize[src]

The maximum value for the start of a range.

pub const MAX_LEN: usize[src]

The maximum length of a range.

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

Constructs a LifetimeRange from a single lifetime parameter.

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

Constructs a LifetimeRange from an array of 5 lifetime indices.

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

Constructs a LifetimeRange from a range.

pub fn len(self) -> usize[src]

The amount of lifetime indices this spans.

pub const fn is_range(self) -> bool[src]

Whether this is a range into a slice of LifetimePairs.

pub const fn to_u21(self) -> u32[src]

Converts this LifetimeRange into its representation

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

Constructs this LifetimeRange from its representation

impl LifetimeRange[src]

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

Expands this LifetimeRange into a LifetimeArrayOrSlice

Trait Implementations

impl Clone for LifetimeRange[src]

impl Copy for LifetimeRange[src]

impl Debug for LifetimeRange[src]

impl Eq for LifetimeRange[src]

impl GetStaticEquivalent_ for LifetimeRange[src]

type StaticEquivalent = _static_LifetimeRange

impl Ord for LifetimeRange[src]

impl PartialEq<LifetimeRange> for LifetimeRange[src]

impl PartialOrd<LifetimeRange> for LifetimeRange[src]

impl StableAbi for LifetimeRange[src]

type IsNonZeroType = <u32 as __StableAbi>::IsNonZeroType

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

impl StructuralEq for LifetimeRange[src]

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