pub struct AtomicBox<T: Sized> { /* private fields */ }Expand description
AtomicBox
Implementations§
Source§impl<T: Sized> AtomicBox<T>
impl<T: Sized> AtomicBox<T>
Sourcepub fn extract_mut_ptr(&mut self) -> *mut T
pub fn extract_mut_ptr(&mut self) -> *mut T
Extract mutable pointer of the contained value
Sourcepub fn replace_with<F>(&self, f: F)
pub fn replace_with<F>(&self, f: F)
Atomically replace the inner value with the result of applying the given closure to the current value
Trait Implementations§
impl<T: Sized + Send> Send for AtomicBox<T>
impl<T: Sized + Sync> Sync for AtomicBox<T>
Auto Trait Implementations§
impl<T> !Freeze for AtomicBox<T>
impl<T> RefUnwindSafe for AtomicBox<T>
impl<T> Unpin for AtomicBox<T>
impl<T> UnwindSafe for AtomicBox<T>where
T: RefUnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more