[−][src]Struct loom::sync::Arc
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> Clone for Arc<T>[src]
impl<T: Debug> Debug for Arc<T>[src]
impl<T: Default> Default for Arc<T>[src]
impl<T> Deref for Arc<T>[src]
impl<T> Drop for Arc<T>[src]
impl<T> From<T> for Arc<T>[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Arc<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Arc<T> where
T: Send + Sync,
T: Send + Sync,
impl<T> Sync for Arc<T> where
T: Send + Sync,
T: Send + Sync,
impl<T> Unpin for Arc<T>
impl<T> UnwindSafe for Arc<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
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<!> for 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, 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>,