[−][src]Struct atomic_refcell::AtomicRefCell
A threadsafe analogue to RefCell.
Implementations
impl<T> AtomicRefCell<T>
[src]
pub const fn new(value: T) -> AtomicRefCell<T>
[src]
Creates a new AtomicRefCell
containing value
.
pub fn into_inner(self) -> T
[src]
Consumes the AtomicRefCell
, returning the wrapped value.
impl<T: ?Sized> AtomicRefCell<T>
[src]
pub fn borrow(&self) -> AtomicRef<'_, T>
[src]
Immutably borrows the wrapped value.
pub fn borrow_mut(&self) -> AtomicRefMut<'_, T>
[src]
Mutably borrows the wrapped value.
pub fn as_ptr(&self) -> *mut T
[src]
Returns a raw pointer to the underlying data in this cell.
External synchronization is needed to avoid data races when dereferencing the pointer.
pub fn get_mut(&mut self) -> &mut T
[src]
Returns a mutable reference to the wrapped value.
No runtime checks take place (unless debug assertions are enabled)
because this call borrows AtomicRefCell
mutably at compile-time.
Trait Implementations
impl<T: Clone> Clone for AtomicRefCell<T>
[src]
fn clone(&self) -> AtomicRefCell<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: ?Sized + Debug> Debug for AtomicRefCell<T>
[src]
impl<T: Default> Default for AtomicRefCell<T>
[src]
fn default() -> AtomicRefCell<T>
[src]
impl<T: ?Sized + Eq> Eq for AtomicRefCell<T>
[src]
impl<T> From<T> for AtomicRefCell<T>
[src]
fn from(t: T) -> AtomicRefCell<T>
[src]
impl<T: ?Sized + Ord> Ord for AtomicRefCell<T>
[src]
fn cmp(&self, other: &AtomicRefCell<T>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T: ?Sized + PartialEq> PartialEq<AtomicRefCell<T>> for AtomicRefCell<T>
[src]
fn eq(&self, other: &AtomicRefCell<T>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T: ?Sized + PartialOrd> PartialOrd<AtomicRefCell<T>> for AtomicRefCell<T>
[src]
fn partial_cmp(&self, other: &AtomicRefCell<T>) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T: ?Sized + Send + Sync> Send for AtomicRefCell<T>
[src]
impl<T: ?Sized + Send + Sync> Sync for AtomicRefCell<T>
[src]
Auto Trait Implementations
impl<T: ?Sized> Unpin for AtomicRefCell<T> where
T: Unpin,
T: Unpin,
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, 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>,