pub struct TreeSet<K>(/* private fields */)
where
K: Clone + Ord;
Implementations§
Source§impl<K> TreeSet<K>
impl<K> TreeSet<K>
pub fn from_ordered_entries(entries: impl IntoIterator<Item = K>) -> Self
pub fn is_empty(&self) -> bool
pub fn insert(&mut self, key: K)
pub fn remove(&mut self, key: &K) -> bool
pub fn extend(&mut self, iter: impl IntoIterator<Item = K>)
pub fn contains(&self, key: &K) -> bool
pub fn iter(&self) -> impl Iterator<Item = &K> + '_
pub fn iter_from<'a>(&'a self, key: &K) -> impl Iterator<Item = &'a K> + 'a
Trait Implementations§
impl<K> Eq for TreeSet<K>
impl<K> StructuralPartialEq for TreeSet<K>
Auto Trait Implementations§
impl<K> Freeze for TreeSet<K>
impl<K> RefUnwindSafe for TreeSet<K>where
K: RefUnwindSafe,
impl<K> Send for TreeSet<K>
impl<K> Sync for TreeSet<K>
impl<K> Unpin for TreeSet<K>
impl<K> UnwindSafe for TreeSet<K>where
K: RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more