pub struct RcuReadGuard<T> { /* private fields */ }Expand description
A read guard for an object managed by the RCU state machine.
This guard ensures that the object remains valid until the guard is dropped.
Implementations§
Source§impl<T> RcuReadGuard<T>
impl<T> RcuReadGuard<T>
Sourcepub fn scope(&self) -> &RcuReadScope
pub fn scope(&self) -> &RcuReadScope
Get the scope in which the object is valid.
Sourcepub fn as_ptr(&self) -> *const T
pub fn as_ptr(&self) -> *const T
Get the raw pointer to the object.
This function returns the raw pointer to the object. The caller is responsible for ensuring that the pointer is not referenced after the guard is dropped.
To use the Rust borrow checker to enforce that the object is not accessed after the guard is
dropped, use the Deref implementation.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for RcuReadGuard<T>
impl<T> RefUnwindSafe for RcuReadGuard<T>where
T: RefUnwindSafe,
impl<T> !Send for RcuReadGuard<T>
impl<T> !Sync for RcuReadGuard<T>
impl<T> Unpin for RcuReadGuard<T>
impl<T> UnsafeUnpin for RcuReadGuard<T>
impl<T> UnwindSafe for RcuReadGuard<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