pub struct RcuReadGuard<T> {
pub scope: RcuReadScope,
/* 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.
Fields§
§scope: RcuReadScopeThe scope in which the object is valid.
Implementations§
Source§impl<T> RcuReadGuard<T>
impl<T> RcuReadGuard<T>
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> 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