pub struct RcuLock<T: Clone> { /* private fields */ }Implementations§
Source§impl<T: Clone> RcuLock<T>
impl<T: Clone> RcuLock<T>
Sourcepub fn read(&self) -> Arc<T>
pub fn read(&self) -> Arc<T>
Acquire a read handle to the RcuLock. This operation never blocks.
Sourcepub fn write(&self) -> RcuGuard<'_, T>
pub fn write(&self) -> RcuGuard<'_, T>
Acquire an exclusive write handle to the RcuLock, protected by an RcuGuard.
This operation blocks if another RcuGuard is currently alive, i.e.
the RcuLock has already handed one out to another writer.
Clones the data protected by the RcuLock, which can be expensive.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for RcuLock<T>
impl<T> !RefUnwindSafe for RcuLock<T>
impl<T> Send for RcuLock<T>
impl<T> Sync for RcuLock<T>
impl<T> Unpin for RcuLock<T>
impl<T> UnwindSafe for RcuLock<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