[−][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 Arc
s 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]
Auto Trait Implementations
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,
impl<T> RefUnwindSafe for Arc<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,