[−][src]Struct thin::Arc
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]
Trait Implementations
impl<T: ?Sized + Thinnable> Clone for ThinArc<T> where
Arc<T>: Clone,
[src]
Arc<T>: Clone,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: ?Sized> Debug for ThinArc<T> where
T: Debug,
T: Thinnable,
[src]
T: Debug,
T: Thinnable,
impl<T: ?Sized + Thinnable> Deref for ThinArc<T>
[src]
impl<T: ?Sized> Display for ThinArc<T> where
T: Display,
T: Thinnable,
[src]
T: Display,
T: Thinnable,
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]
T: PartialEq<O>,
T: Thinnable,
impl<T: ?Sized, O: ?Sized> PartialOrd<O> for ThinArc<T> where
T: PartialOrd<O>,
T: Thinnable,
[src]
T: PartialOrd<O>,
T: Thinnable,
fn partial_cmp(&self, other: &O) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T: ?Sized + Thinnable> Send for ThinArc<T> where
T: Send,
[src]
T: Send,
impl<T: ?Sized + Thinnable> Sync for ThinArc<T> where
T: Send,
[src]
T: Send,
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,