Struct starlark_map::sorted_set::SortedSet
source · pub struct SortedSet<T: Eq + Hash> { /* private fields */ }
Expand description
An immutable SmallSet
with values guaranteed to be sorted.
Implementations§
source§impl<T> SortedSet<T>
impl<T> SortedSet<T>
sourcepub fn new_unchecked(inner: OrderedSet<T>) -> Self
pub fn new_unchecked(inner: OrderedSet<T>) -> Self
Construct without checking that the elements are sorted.
sourcepub fn iter(&self) -> impl ExactSizeIterator<Item = &T>
pub fn iter(&self) -> impl ExactSizeIterator<Item = &T>
Iterate over the elements.
Trait Implementations§
source§impl<T: Eq + Hash + Allocative> Allocative for SortedSet<T>
impl<T: Eq + Hash + Allocative> Allocative for SortedSet<T>
source§impl<T> From<OrderedSet<T>> for SortedSet<T>
impl<T> From<OrderedSet<T>> for SortedSet<T>
source§fn from(inner: OrderedSet<T>) -> SortedSet<T>
fn from(inner: OrderedSet<T>) -> SortedSet<T>
Converts to this type from the input type.
source§impl<T> FromIterator<T> for SortedSet<T>
impl<T> FromIterator<T> for SortedSet<T>
source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a value from an iterator. Read more
source§impl<'a, T> IntoIterator for &'a SortedSet<T>
impl<'a, T> IntoIterator for &'a SortedSet<T>
source§impl<T> IntoIterator for SortedSet<T>
impl<T> IntoIterator for SortedSet<T>
source§impl<T: Ord + Eq + Hash> Ord for SortedSet<T>
impl<T: Ord + Eq + Hash> Ord for SortedSet<T>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialEq + Eq + Hash> PartialEq for SortedSet<T>
impl<T: PartialEq + Eq + Hash> PartialEq for SortedSet<T>
source§impl<T: PartialOrd + Eq + Hash> PartialOrd for SortedSet<T>
impl<T: PartialOrd + Eq + Hash> PartialOrd for SortedSet<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: Eq + Eq + Hash> Eq for SortedSet<T>
impl<T: Eq + Hash> StructuralPartialEq for SortedSet<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for SortedSet<T>where
T: RefUnwindSafe,
impl<T> Send for SortedSet<T>where
T: Send,
impl<T> Sync for SortedSet<T>where
T: Sync,
impl<T> Unpin for SortedSet<T>where
T: Unpin,
impl<T> UnwindSafe for SortedSet<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
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.