Struct tokio::util::sharded_list::ShardGuard
source · pub(crate) struct ShardGuard<'a, L, T> {
lock: MutexGuard<'a, LinkedList<L, T>>,
added: &'a MetricAtomicU64,
count: &'a MetricAtomicUsize,
id: usize,
}
Expand description
Used to get the lock of shard.
Fields§
§lock: MutexGuard<'a, LinkedList<L, T>>
§added: &'a MetricAtomicU64
§count: &'a MetricAtomicUsize
§id: usize
Implementations§
source§impl<'a, L: ShardedListItem> ShardGuard<'a, L, L::Target>
impl<'a, L: ShardedListItem> ShardGuard<'a, L, L::Target>
Auto Trait Implementations§
impl<'a, L, T> Freeze for ShardGuard<'a, L, T>
impl<'a, L, T> RefUnwindSafe for ShardGuard<'a, L, T>
impl<'a, L, T> !Send for ShardGuard<'a, L, T>
impl<'a, L, T> Sync for ShardGuard<'a, L, T>
impl<'a, L, T> Unpin for ShardGuard<'a, L, T>
impl<'a, L, T> UnwindSafe for ShardGuard<'a, L, T>
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