pub struct Arc<T> { /* private fields */ }Expand description
A replacement for std::sync::Arc.
Implementations§
Source§impl<T> Arc<T>
Similar to std::sync::Arc. There is no weak count and thus no Weak struct.
In accordance with the deferred reclamation scheme, the ref count of the pointed-to block
may not immediately be decremented on drop.
impl<T> Arc<T>
Similar to std::sync::Arc. There is no weak count and thus no Weak struct.
In accordance with the deferred reclamation scheme, the ref count of the pointed-to block
may not immediately be decremented on drop.
Sourcepub fn new(data: T) -> Self
pub fn new(data: T) -> Self
See: std::sync::Arc::new.
Sourcepub unsafe fn get_mut_unchecked(this: &mut Self) -> &mut T
pub unsafe fn get_mut_unchecked(this: &mut Self) -> &mut T
§Safety
Since Guards may exist, there is no safe get_mut.
It is the user’s responsibility to ensure that there are no other pointers to the same allocation.
Trait Implementations§
Source§impl<T: 'static> CompareExchange<T, &Arc<T>> for AtomicArc<T>
impl<T: 'static> CompareExchange<T, &Arc<T>> for AtomicArc<T>
Auto Trait Implementations§
impl<T> Freeze for Arc<T>
impl<T> RefUnwindSafe for Arc<T>where
T: RefUnwindSafe,
impl<T> !Send for Arc<T>
impl<T> !Sync for Arc<T>
impl<T> Unpin for Arc<T>where
T: Unpin,
impl<T> UnwindSafe for Arc<T>where
T: RefUnwindSafe + UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more