Struct atomic_borrow::SharedGuard
source · pub struct SharedGuard<'a, T> { /* private fields */ }Expand description
A guard that releases a shared reference when dropped.
Implementations
sourcepub fn new(data: &'a T, borrow: &'a AtomicBorrow) -> Self
pub fn new(data: &'a T, borrow: &'a AtomicBorrow) -> Self
Creates a new SharedGuard.
sourcepub unsafe fn try_new(data: *const T, borrow: &'a AtomicBorrow) -> Option<Self>
pub unsafe fn try_new(data: *const T, borrow: &'a AtomicBorrow) -> Option<Self>
sourcepub unsafe fn spin(data: *const T, borrow: &'a AtomicBorrow) -> Self
pub unsafe fn spin(data: *const T, borrow: &'a AtomicBorrow) -> Self
Trait Implementations
Auto Trait Implementations
Blanket Implementations
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more