[][src]Struct thin::Arc

pub struct Arc<T: ?Sized + Thinnable> { /* fields omitted */ }

Implementations

impl<T: ?Sized + Thinnable> ThinArc<T>[src]

pub unsafe fn from_thin(thin: NonNull<Erased>) -> Self[src]

Construct an owned thin pointer from a raw thin pointer.

Safety

This pointer must logically own a valid instance of Self.

pub fn into_thin(this: Self) -> NonNull<Erased>[src]

Convert this owned thin pointer into a raw thin pointer.

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

pub unsafe fn from_fat(fat: NonNull<T>) -> Self[src]

Construct an owned thin pointer from a raw fat pointer.

Safety

This pointer must logically own a valid instance of Self.

pub fn into_fat(this: Self) -> Arc<T>[src]

Convert this owned thin pointer into an owned fat pointer.

This is the std type that this type pretends to be. You can convert freely between the two representations with this function and Self::from(fat).

impl<T: ?Sized + Thinnable> ThinArc<T>[src]

pub fn new(
    slice: Vec<T::SliceItem>,
    head: impl FnOnce(&[T::SliceItem]) -> T::Head
) -> Self
[src]

Trait Implementations

impl<T: ?Sized + Thinnable> Clone for ThinArc<T> where
    Arc<T>: Clone
[src]

impl<T: ?Sized> Debug for ThinArc<T> where
    T: Debug,
    T: Thinnable
[src]

impl<T: ?Sized + Thinnable> Deref for ThinArc<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T: ?Sized> Display for ThinArc<T> where
    T: Display,
    T: Thinnable
[src]

impl<T: ?Sized + Thinnable> Drop for ThinArc<T>[src]

impl<T: ?Sized + Thinnable> From<Arc<T>> for ThinArc<T>[src]

impl<T> From<Vec<T>> for Arc<ThinSlice<T>>[src]

impl<T: ?Sized, O: ?Sized> PartialEq<O> for ThinArc<T> where
    T: PartialEq<O>,
    T: Thinnable
[src]

impl<T: ?Sized, O: ?Sized> PartialOrd<O> for ThinArc<T> where
    T: PartialOrd<O>,
    T: Thinnable
[src]

impl<T: ?Sized + Thinnable> Send for ThinArc<T> where
    T: Send
[src]

impl<T: ?Sized + Thinnable> Sync for ThinArc<T> where
    T: Send
[src]

Auto Trait Implementations

impl<T: ?Sized> Unpin for ThinArc<T>

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> ToString for T where
    T: Display + ?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.