pub struct RcuBox<T, F = RcuDefaultFlavor> { /* private fields */ }Expand description
Defines a RCU-enabled Box.
§Limitations
§Mutable References
Because there might always be readers borrowing a node’s data, it is impossible to get a mutable references to the data inside the linked list. You should design the type stored in the list with interior mutabillity that can be shared between threads.
§Safety
It is safe to send an Arc<RcuBox<T>> to a non-registered RCU thread. A non-registered
thread may drop an RcuBox<T> without calling any RCU primitives since lifetime rules
prevent any other thread from accessing a RCU reference.
Implementations§
Trait Implementations§
impl<T, F> Send for RcuBox<T, F>where
T: Send,
impl<T, F> Sync for RcuBox<T, F>where
T: Sync,
Auto Trait Implementations§
impl<T, F = RcuFlavorMemb> !Freeze for RcuBox<T, F>
impl<T, F> RefUnwindSafe for RcuBox<T, F>where
F: RefUnwindSafe,
impl<T, F> Unpin for RcuBox<T, F>
impl<T, F> UnwindSafe for RcuBox<T, F>where
T: RefUnwindSafe,
F: 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