pub struct AtomicRef<'b, T: ?Sized + 'b> {
pub(crate) value: NonNull<T>,
pub(crate) borrow: AtomicBorrowRef<'b>,
}Expand description
A wrapper type for an immutably borrowed value from an AtomicRefCell<T>.
Fields§
§value: NonNull<T>§borrow: AtomicBorrowRef<'b>Implementations§
Source§impl<'b, T: ?Sized> AtomicRef<'b, T>
impl<'b, T: ?Sized> AtomicRef<'b, T>
Sourcepub fn clone(orig: &AtomicRef<'b, T>) -> AtomicRef<'b, T>
pub fn clone(orig: &AtomicRef<'b, T>) -> AtomicRef<'b, T>
Copies an AtomicRef.
Like its std-counterpart, this type does not implement Clone
to not interfere with cloning the contained type.
Trait Implementations§
impl<'b, T: ?Sized> Send for AtomicRef<'b, T>
impl<'b, T: ?Sized> Sync for AtomicRef<'b, T>
Auto Trait Implementations§
impl<'b, T> Freeze for AtomicRef<'b, T>where
T: ?Sized,
impl<'b, T> RefUnwindSafe for AtomicRef<'b, T>where
T: RefUnwindSafe + ?Sized,
impl<'b, T> Unpin for AtomicRef<'b, T>where
T: ?Sized,
impl<'b, T> UnwindSafe for AtomicRef<'b, T>where
T: RefUnwindSafe + ?Sized,
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