pub(super) struct RefBlockWriteGuard<'a> {
rb: &'a RefBlock,
_lock: MutexGuard<'a, ()>,
}
Expand description
Write guard for a refblock.
Fields§
§rb: &'a RefBlock
Referenced refblock.
_lock: MutexGuard<'a, ()>
Held guard mutex on that refblock.
Implementations§
Source§impl RefBlockWriteGuard<'_>
impl RefBlockWriteGuard<'_>
Sourceunsafe fn fetch_update_bitset(
bitset: &AtomicU8,
change: i64,
base_mask: u8,
shift: usize,
) -> Result<u64>
unsafe fn fetch_update_bitset( bitset: &AtomicU8, change: i64, base_mask: u8, shift: usize, ) -> Result<u64>
§Safety
Caller must ensure there are no concurrent writers.
Sourceunsafe fn fetch_update_full<T, L: FnOnce(&T) -> u64, S: FnOnce(&T, u64) -> Result<(), TryFromIntError>>(
atomic: &T,
change: i64,
load: L,
store: S,
) -> Result<u64>
unsafe fn fetch_update_full<T, L: FnOnce(&T) -> u64, S: FnOnce(&T, u64) -> Result<(), TryFromIntError>>( atomic: &T, change: i64, load: L, store: S, ) -> Result<u64>
§Safety
Caller must ensure there are no concurrent writers.
Sourcefn modify(&mut self, index: usize, change: i64) -> Result<u64>
fn modify(&mut self, index: usize, change: i64) -> Result<u64>
Modify the given cluster’s refcount.
Sourcepub fn increment(&mut self, index: usize) -> Result<u64>
pub fn increment(&mut self, index: usize) -> Result<u64>
Increment the given cluster’s refcount.
Returns the old value.
Auto Trait Implementations§
impl<'a> Freeze for RefBlockWriteGuard<'a>
impl<'a> !RefUnwindSafe for RefBlockWriteGuard<'a>
impl<'a> Send for RefBlockWriteGuard<'a>
impl<'a> Sync for RefBlockWriteGuard<'a>
impl<'a> Unpin for RefBlockWriteGuard<'a>
impl<'a> !UnwindSafe for RefBlockWriteGuard<'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