[−][src]Struct abox::AtomicBox
AtomicBox
Implementations
impl<T: Sized> AtomicBox<T>
[src]
pub fn new(value: T) -> AtomicBox<T>
[src]
Allocates a new AtomicBox containing the given value
pub fn get(&self) -> Arc<T>
[src]
pub fn replace_with<F>(&self, f: F) where
F: Fn(Arc<T>) -> T,
[src]
F: Fn(Arc<T>) -> T,
Atomically replace the inner value with the result of applying the given closure to the current value
Trait Implementations
impl<T: Debug + Sized> Debug for AtomicBox<T>
[src]
impl<T: Sized> Drop for AtomicBox<T>
[src]
impl<T: Sized + PartialEq> PartialEq<AtomicBox<T>> for AtomicBox<T>
[src]
fn eq(&self, other: &AtomicBox<T>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T: Sized + Send> Send for AtomicBox<T>
[src]
impl<T: Sized + Sync> Sync for AtomicBox<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for AtomicBox<T>
[src]
impl<T> Unpin for AtomicBox<T>
[src]
impl<T> UnwindSafe for AtomicBox<T> where
T: RefUnwindSafe,
[src]
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,
pub fn borrow_mut(&mut self) -> &mut 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, 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.
pub 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>,