Struct rolling_set::RollingSet
source · Implementations§
source§impl<T> RollingSet<T>where
T: Eq + Hash + Clone,
impl<T> RollingSet<T>where
T: Eq + Hash + Clone,
pub fn new(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn insert(&mut self, element: T)
pub fn pop(&mut self) -> Option<T>
pub fn is_empty(&self) -> bool
pub fn is_full(&self) -> bool
pub fn set_capacity(&mut self, new: usize) -> usize
pub fn capacity(&self) -> usize
pub fn remove(&mut self, element: &T) -> bool
pub fn contains(&self, element: &T) -> bool
pub fn len(&self) -> usize
pub fn clear(&mut self)
Trait Implementations§
source§impl<T: Clone + Hash + Eq> Clone for RollingSet<T>
impl<T: Clone + Hash + Eq> Clone for RollingSet<T>
source§fn clone(&self) -> RollingSet<T>
fn clone(&self) -> RollingSet<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: PartialEq + Hash + Eq> PartialEq<RollingSet<T>> for RollingSet<T>
impl<T: PartialEq + Hash + Eq> PartialEq<RollingSet<T>> for RollingSet<T>
source§fn eq(&self, other: &RollingSet<T>) -> bool
fn eq(&self, other: &RollingSet<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.