[][src]Struct abi_stable::type_layout::StartLen

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

The start and length of a slice into TLFunctions.

Implementations

impl StartLen[src]

pub const fn new(start: u16, len: u16) -> Self[src]

Constructs a range.

pub const fn start(self) -> u16[src]

Gets the start of the range.

pub const fn len(self) -> u16[src]

Gets the length of the range.

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

Whether the range is empty.

pub const fn start_usize(self) -> usize[src]

Gets the start of the range as a usize.

pub const fn len_usize(self) -> usize[src]

Gets the length of the range as a usize.

pub const fn end_usize(self) -> usize[src]

Gets the exclusive end of the range as a usize.

pub const fn to_range(self) -> Range<usize>[src]

Converts this range to a std::ops::Range.

pub const fn from_u32(n: StartLenRepr) -> Self[src]

Constructs this StartLen from its internal representation.

pub const EMPTY: Self[src]

An empty range.

pub const BIT_SIZE: u32[src]

The amount of bits used to represent a StartLen

pub const fn end(self) -> usize[src]

The exclusive end of this range.

pub const fn from_u26(n: u32) -> Self[src]

Constructs a StartLen from a bitfield encoded as (start:16 bits) + (length: 10 bits) .

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

Converts this StartLen to bitfields encoded as (start:16 bits) + (length: 10 bits) .

Trait Implementations

impl Clone for StartLen[src]

impl Copy for StartLen[src]

impl Debug for StartLen[src]

impl Eq for StartLen[src]

impl GetStaticEquivalent_ for StartLen[src]

type StaticEquivalent = _static_StartLen

impl Ord for StartLen[src]

impl PartialEq<StartLen> for StartLen[src]

impl PartialOrd<StartLen> for StartLen[src]

impl StableAbi for StartLen[src]

type IsNonZeroType = <u32 as __StableAbi>::IsNonZeroType

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

impl StructuralEq for StartLen[src]

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