[][src]Struct thin::Rc

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

Implementations

impl<T: ?Sized + Thinnable> ThinRc<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) -> Rc<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> ThinRc<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 ThinRc<T> where
    Rc<T>: Clone
[src]

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

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

type Target = T

The resulting type after dereferencing.

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

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

impl<T: ?Sized + Thinnable> From<Rc<T>> for ThinRc<T>[src]

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

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

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

Auto Trait Implementations

impl<T> !Send for ThinRc<T>

impl<T> !Sync for ThinRc<T>

impl<T: ?Sized> Unpin for ThinRc<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.