[][src]Struct pui_vec::Id

pub struct Id<T> { /* fields omitted */ }

A branded index that can be used to elide bounds checks

Implementations

impl<T> Id<T>[src]

pub const unsafe fn new_unchecked(index: usize, token: T) -> Self[src]

Create a new branded index

Safety

The given index must be in bounds for the PuiVec whose identifier owns the given token

pub fn into_raw_parts(self) -> (usize, T)[src]

Get the index and token from the branded index

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

Returns the index of this Id

pub const fn token(&self) -> &T[src]

Returns a reference to the token of this Id

Trait Implementations

impl<I: OneShotIdentifier> BuildPuiVecIndex<I> for Id<I::Token>[src]

impl<T: Clone> Clone for Id<T>[src]

impl<T: Copy> Copy for Id<T>[src]

impl<T: Debug> Debug for Id<T>[src]

impl<T: Eq> Eq for Id<T>[src]

impl<T: Hash> Hash for Id<T>[src]

impl<T: Ord> Ord for Id<T>[src]

impl<T: PartialEq> PartialEq<Id<T>> for Id<T>[src]

impl<T: PartialOrd> PartialOrd<Id<T>> for Id<T>[src]

impl<T, I: OneShotIdentifier> PuiVecAccess<T, I> for Id<I::Token>[src]

type Output = T

The output type returned by methods.

impl<I: OneShotIdentifier> PuiVecIndex<I> for Id<I::Token>[src]

type SliceIndex = usize

The underlying index/range type

impl<T> StructuralEq for Id<T>[src]

impl<T> StructuralPartialEq for Id<T>[src]

Auto Trait Implementations

impl<T> Send for Id<T> where
    T: Send
[src]

impl<T> Sync for Id<T> where
    T: Sync
[src]

impl<T> Unpin for Id<T> where
    T: Unpin
[src]

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<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.