pub struct SetRef<'a, K: Key> { /* private fields */ }Expand description
A convenience handle that bundles a set reference with an epoch guard.
Implementations§
Source§impl<K: Key> SetRef<'_, K>
impl<K: Key> SetRef<'_, K>
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Return the approximate number of elements in the set.
See LearnedMap::len for details on
relaxed-atomic staleness under concurrency.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Return true if the set is empty.
Subject to the same relaxed-atomic staleness as len.
Sourcepub fn range<R: RangeBounds<K>>(&self, range: R) -> impl Iterator<Item = &K>
pub fn range<R: RangeBounds<K>>(&self, range: R) -> impl Iterator<Item = &K>
Return an iterator over keys within the given range, in ascending order.
Auto Trait Implementations§
impl<'a, K> Freeze for SetRef<'a, K>
impl<'a, K> !RefUnwindSafe for SetRef<'a, K>
impl<'a, K> !Send for SetRef<'a, K>
impl<'a, K> !Sync for SetRef<'a, K>
impl<'a, K> Unpin for SetRef<'a, K>
impl<'a, K> UnsafeUnpin for SetRef<'a, K>
impl<'a, K> !UnwindSafe for SetRef<'a, K>
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