pub struct CappedSet<T, const N: usize>{ /* private fields */ }Implementations§
Source§impl<T, const N: usize> CappedSet<T, N>
impl<T, const N: usize> CappedSet<T, N>
pub fn new() -> Self
pub fn insert(&mut self, value: T) -> Option<T>
pub fn remove(&mut self, value: T) -> bool
pub fn take(&mut self, value: T) -> Option<T>
pub fn len(&self) -> usize
pub const fn capacity(&self) -> usize
pub fn is_full(&self) -> bool
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> Iter<'_, T>
pub fn clear(&mut self)
pub fn reset(&mut self)
pub fn clear_completely(&mut self)
pub fn contains(&self, val_ref: &T) -> bool
Auto Trait Implementations§
impl<T, const N: usize> Freeze for CappedSet<T, N>where
T: Freeze,
impl<T, const N: usize> RefUnwindSafe for CappedSet<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for CappedSet<T, N>where
T: Send,
impl<T, const N: usize> Sync for CappedSet<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for CappedSet<T, N>where
T: Unpin,
impl<T, const N: usize> UnsafeUnpin for CappedSet<T, N>where
T: UnsafeUnpin,
impl<T, const N: usize> UnwindSafe for CappedSet<T, N>where
T: UnwindSafe,
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