pub struct RangeBlockedGuard<'a> {
list: &'a RwLock<RangeBlockedList>,
block: Option<Arc<RangeBlocked>>,
}Expand description
Keeps a RangeBlocked alive.
When dropped, removes the RangeBlocked from its list, and wakes all requests in the waitlist.
Fields§
§list: &'a RwLock<RangeBlockedList>List where this blocker resides.
block: Option<Arc<RangeBlocked>>Option, so drop() can take() it and unwrap the Arc.
Consequently, do not clone: Must have refcount 1 when dropped. (The only clone must be in
self.list.blocked, under index self.block.index.)
Trait Implementations§
Source§impl<'a> Debug for RangeBlockedGuard<'a>
impl<'a> Debug for RangeBlockedGuard<'a>
Auto Trait Implementations§
impl<'a> Freeze for RangeBlockedGuard<'a>
impl<'a> RefUnwindSafe for RangeBlockedGuard<'a>
impl<'a> Send for RangeBlockedGuard<'a>
impl<'a> Sync for RangeBlockedGuard<'a>
impl<'a> Unpin for RangeBlockedGuard<'a>
impl<'a> UnwindSafe for RangeBlockedGuard<'a>
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