[][src]Struct erasable::Thin

pub struct Thin<P: ErasablePtr> { /* fields omitted */ }
[]

Wrapper struct to create thin pointer types.

Methods

impl<P: ErasablePtr> Thin<P>[src][]

pub fn into_inner(this: Self) -> P[src][]

Extract the wrapped pointer.

pub fn with<F, T>(this: &Self, f: F) -> T where
    F: FnOnce(&P) -> T, 
[src][]

Run a closure with a borrow of the real pointer.

pub fn with_mut<F, T>(this: &mut Self, f: F) -> T where
    F: FnOnce(&mut P) -> T, 
[src][]

Run a closure with a mutable borrow of the real pointer.

Trait Implementations

impl<P: ErasablePtr> Deref for Thin<P> where
    P: Deref
[src][+]

type Target = P::Target

The resulting type after dereferencing.

impl<P: ErasablePtr> DerefMut for Thin<P> where
    P: DerefMut
[src][+]

impl<P: ErasablePtr> From<P> for Thin<P>[src][+]

impl<P: ErasablePtr> Debug for Thin<P> where
    P: Debug
[src][+]

impl<P: ErasablePtr> Display for Thin<P> where
    P: Display
[src][+]

impl<P: ErasablePtr> PartialEq<Thin<P>> for Thin<P> where
    P: PartialEq
[src][+]

impl<P: ErasablePtr> Eq for Thin<P> where
    P: Eq
[src]

impl<P: ErasablePtr> Ord for Thin<P> where
    P: Ord
[src][+]

impl<P: ErasablePtr> PartialOrd<Thin<P>> for Thin<P> where
    P: PartialOrd
[src][+]

impl<P: ErasablePtr> Drop for Thin<P>[src][+]

impl<P: ErasablePtr> Hash for Thin<P> where
    P: Hash
[src][+]

impl<P: ErasablePtr> Hasher for Thin<P> where
    P: Hasher
[src][+]

impl<P: ErasablePtr> Send for Thin<P> where
    P: Send
[src]

impl<P: ErasablePtr> Sync for Thin<P> where
    P: Sync
[src]

impl<P: ErasablePtr> Iterator for Thin<P> where
    P: Iterator
[src][+]

type Item = P::Item

The type of the elements being iterated over.

impl<P: ErasablePtr> DoubleEndedIterator for Thin<P> where
    P: DoubleEndedIterator
[src][+]

impl<P: ErasablePtr> ExactSizeIterator for Thin<P> where
    P: ExactSizeIterator
[src][+]

impl<P: ErasablePtr> FusedIterator for Thin<P> where
    P: FusedIterator
[src]

impl<P: ErasablePtr, T: ?Sized> AsRef<T> for Thin<P> where
    P: AsRef<T>, 
[src][+]

impl<P: ErasablePtr, T: ?Sized> AsMut<T> for Thin<P> where
    P: AsMut<T>, 
[src][+]

impl<P: ErasablePtr> Pointer for Thin<P> where
    P: Pointer
[src][+]

Auto Trait Implementations

impl<P> Unpin for Thin<P> where
    P: Unpin

Blanket Implementations

impl<T> Erasable for T[src][+]

impl<T> From<!> for T[src][+]

impl<T> From<T> for T[src][+]

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

type Error = !

The type returned in the event of a conversion error.

impl<I> IntoIterator for I where
    I: Iterator
[src][+]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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

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> ToString for T where
    T: Display + ?Sized
[src][+]