Struct starlark_map::unordered_set::UnorderedSet
source · pub struct UnorderedSet<T> { /* private fields */ }
Expand description
HashSet
that does not expose insertion order.
Implementations§
source§impl<T> UnorderedSet<T>
impl<T> UnorderedSet<T>
sourcepub const fn new() -> UnorderedSet<T>
pub const fn new() -> UnorderedSet<T>
Create a new empty set.
sourcepub fn with_capacity(n: usize) -> UnorderedSet<T>
pub fn with_capacity(n: usize) -> UnorderedSet<T>
Create a new empty set with the specified capacity.
sourcepub fn contains_hashed<Q>(&self, value: Hashed<&Q>) -> boolwhere
Q: Equivalent<T> + ?Sized,
pub fn contains_hashed<Q>(&self, value: Hashed<&Q>) -> boolwhere
Q: Equivalent<T> + ?Sized,
Does the set contain the specified value?
sourcepub fn raw_entry_mut(&mut self) -> RawEntryBuilderMut<'_, T>
pub fn raw_entry_mut(&mut self) -> RawEntryBuilderMut<'_, T>
Lower-level access to the underlying map.
sourcepub fn entries_sorted(&self) -> Vec<&T>where
T: Ord,
pub fn entries_sorted(&self) -> Vec<&T>where
T: Ord,
Get the entries in the set, sorted.
Trait Implementations§
source§impl<T: Allocative> Allocative for UnorderedSet<T>
impl<T: Allocative> Allocative for UnorderedSet<T>
source§impl<T: Clone> Clone for UnorderedSet<T>
impl<T: Clone> Clone for UnorderedSet<T>
source§fn clone(&self) -> UnorderedSet<T>
fn clone(&self) -> UnorderedSet<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: Debug> Debug for UnorderedSet<T>
impl<T: Debug> Debug for UnorderedSet<T>
source§impl<T> Default for UnorderedSet<T>
impl<T> Default for UnorderedSet<T>
source§fn default() -> UnorderedSet<T>
fn default() -> UnorderedSet<T>
Returns the “default value” for a type. Read more
source§impl<T: Eq + Hash> FromIterator<T> for UnorderedSet<T>
impl<T: Eq + Hash> FromIterator<T> for UnorderedSet<T>
source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> UnorderedSet<T>
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> UnorderedSet<T>
Creates a value from an iterator. Read more
source§impl<T: Eq + Hash> PartialEq for UnorderedSet<T>
impl<T: Eq + Hash> PartialEq for UnorderedSet<T>
impl<T: Eq + Hash> Eq for UnorderedSet<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for UnorderedSet<T>where
T: RefUnwindSafe,
impl<T> Send for UnorderedSet<T>where
T: Send,
impl<T> Sync for UnorderedSet<T>where
T: Sync,
impl<T> Unpin for UnorderedSet<T>where
T: Unpin,
impl<T> UnwindSafe for UnorderedSet<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> 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.