[][src]Struct perthread::PerThread

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

Values inserted into the map are returned to the caller inside this wrapper. The caller will hold on to this wrapper as long as they like, then when they drop it the corresponding entry is removed from the map.

The map data structure holds a pointer NonNull to the content of the storage box. We must not expose an API through which the owner of a PerThread could invalidate that pointer, for example by moving the content or dropping the content outside of PerThread's Drop impl.

Trait Implementations

impl<T> AsRef<T> for PerThread<T>[src]

impl<T> Debug for PerThread<T> where
    T: Debug
[src]

impl<T> Deref for PerThread<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T> Drop for PerThread<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for PerThread<T> where
    T: RefUnwindSafe
[src]

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

impl<T> Sync for PerThread<T>[src]

impl<T> Unpin for PerThread<T>[src]

impl<T> UnwindSafe for PerThread<T> where
    T: UnwindSafe
[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, 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.