[][src]Struct loom::sync::Arc

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

Mock implementation of std::sync::Arc.

Methods

impl<T> Arc<T>[src]

pub fn new(value: T) -> Arc<T>[src]

Constructs a new Arc<T>.

pub fn strong_count(_this: &Self) -> usize[src]

Gets the number of strong (Arc) pointers to this value.

pub fn get_mut(this: &mut Self) -> Option<&mut T>[src]

Returns a mutable reference to the inner value, if there are no other Arc or [Weak][weak] pointers to the same value.

pub fn ptr_eq(this: &Self, other: &Self) -> bool[src]

Returns true if the two Arcs point to the same value (not just values that compare as equal).

pub fn into_raw(this: Self) -> *const T[src]

Consumes the Arc, returning the wrapped pointer.

pub unsafe fn from_raw(ptr: *const T) -> Self[src]

Constructs an Arc from a raw pointer.

Trait Implementations

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

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

impl<T> Clone for Arc<T>[src]

impl<T: Default> Default for Arc<T>[src]

impl<T: Debug> Debug for Arc<T>[src]

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

type Target = T

The resulting type after dereferencing.

Auto Trait Implementations

impl<T> Send for Arc<T> where
    T: Send + Sync

impl<T> Sync for Arc<T> where
    T: Send + Sync

impl<T> Unpin for Arc<T>

impl<T> UnwindSafe for Arc<T> where
    T: RefUnwindSafe

impl<T> RefUnwindSafe for Arc<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<!> for T[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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]