Struct ra_ap_rustc_data_structures::AtomicRef
source · pub struct AtomicRef<T: 'static>(/* private fields */);
Expand description
This is essentially an AtomicPtr
but is guaranteed to always be valid
Implementations§
source§impl<T: 'static> AtomicRef<T>
impl<T: 'static> AtomicRef<T>
pub const fn new(initial: &'static T) -> AtomicRef<T>
pub fn swap(&self, new: &'static T) -> &'static T
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for AtomicRef<T>where
T: RefUnwindSafe,
impl<T> Send for AtomicRef<T>where
T: Sync,
impl<T> Sync for AtomicRef<T>where
T: Sync,
impl<T> Unpin for AtomicRef<T>
impl<T> UnwindSafe for AtomicRef<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