[][src]Struct thin_dst::ThinBox

pub struct ThinBox<Head, SliceItem> { /* fields omitted */ }

Methods

impl<Head, SliceItem> ThinBox<Head, SliceItem>[src]

pub unsafe fn from_erased(ptr: ErasedPtr) -> Self[src]

Construct an owned pointer from an erased pointer.

Safety

This pointer must logically own a valid instance of Self.

pub fn erase(this: Self) -> ErasedPtr[src]

Convert this owned pointer into an erased pointer.

To avoid a memory leak the pointer must be converted back using Self::from_erased.

impl<Head, SliceItem> ThinBox<Head, SliceItem>[src]

pub fn new<I>(head: Head, slice: I) -> Self where
    I: IntoIterator<Item = SliceItem>,
    I::IntoIter: ExactSizeIterator
[src]

Trait Implementations

impl<Head, SliceItem> From<Box<ThinData<Head, SliceItem>>> for ThinBox<Head, SliceItem>[src]

impl<Head, SliceItem> From<ThinBox<Head, SliceItem>> for Box<ThinData<Head, SliceItem>>[src]

impl<Head, SliceItem> Debug for ThinBox<Head, SliceItem> where
    ThinData<Head, SliceItem>: Debug
[src]

impl<Head, SliceItem> PartialEq<ThinBox<Head, SliceItem>> for ThinBox<Head, SliceItem> where
    ThinData<Head, SliceItem>: PartialEq
[src]

impl<Head, SliceItem> Eq for ThinBox<Head, SliceItem> where
    ThinData<Head, SliceItem>: Eq
[src]

impl<Head, SliceItem> Deref for ThinBox<Head, SliceItem> where
    Box<ThinData<Head, SliceItem>>: Deref
[src]

type Target = ThinData<Head, SliceItem>

The resulting type after dereferencing.

impl<Head, SliceItem> DerefMut for ThinBox<Head, SliceItem> where
    Box<ThinData<Head, SliceItem>>: DerefMut
[src]

impl<Head, SliceItem> Drop for ThinBox<Head, SliceItem>[src]

impl<Head, SliceItem> Send for ThinBox<Head, SliceItem> where
    Box<ThinData<Head, SliceItem>>: Send
[src]

impl<Head, SliceItem> Sync for ThinBox<Head, SliceItem> where
    Box<ThinData<Head, SliceItem>>: Sync
[src]

impl<Head, SliceItem> Clone for ThinBox<Head, SliceItem> where
    Head: Clone,
    SliceItem: Clone
[src]

Auto Trait Implementations

impl<Head, SliceItem> Unpin for ThinBox<Head, SliceItem>

Blanket Implementations

impl<T> From<T> for 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> 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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.