pub struct FIFOSet<T> { /* private fields */ }
Expand description
A FIFO queue with unique values.
Implementations§
Source§impl<T: Eq + Hash> FIFOSet<T>
impl<T: Eq + Hash> FIFOSet<T>
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn get(&self, index: usize) -> Option<&T>
pub fn swap(&mut self, i: usize, j: usize)
pub fn capacity(&self) -> usize
pub fn reserve(&mut self, additional: usize)
pub fn iter(&self) -> Iter<'_, T>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn range<R: RangeBounds<usize>>(&self, range: R) -> Iter<'_, T>
pub fn clear(&mut self)
pub fn contains(&self, x: &T) -> bool
pub fn peek(&self) -> Option<&T>
pub fn remove(&mut self, index: usize) -> Option<T>
Trait Implementations§
Source§impl<A: Copy + Eq + Hash> Extend<A> for FIFOSet<A>
impl<A: Copy + Eq + Hash> Extend<A> for FIFOSet<A>
Source§fn extend<T: IntoIterator<Item = A>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = A>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Auto Trait Implementations§
impl<T> Freeze for FIFOSet<T>
impl<T> RefUnwindSafe for FIFOSet<T>where
T: RefUnwindSafe,
impl<T> Send for FIFOSet<T>where
T: Send,
impl<T> Sync for FIFOSet<T>where
T: Sync,
impl<T> Unpin for FIFOSet<T>where
T: Unpin,
impl<T> UnwindSafe for FIFOSet<T>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