Type Alias UstrFinSet

Source
pub type UstrFinSet = HashFinSet<Ustr, BuildHasherDefault<IdentityHasher>>;
Expand description

A finite set with elements of type Ustr.

Aliased Type§

struct UstrFinSet(/* private fields */);

Implementations

Source§

impl<T, S> HashFinSet<T, S>
where T: Eq + Hash, S: BuildHasher,

Source

pub fn insert(&mut self, x: T) -> bool

Adds an element to the set.

Trait Implementations

Source§

impl<T: Clone, S: Clone> Clone for HashFinSet<T, S>

Source§

fn clone(&self) -> HashFinSet<T, S>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug, S: Debug> Debug for HashFinSet<T, S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, S> Default for HashFinSet<T, S>
where S: Default,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T, S> Extend<T> for HashFinSet<T, S>
where T: Eq + Hash, S: BuildHasher,

Source§

fn extend<Iter>(&mut self, iter: Iter)
where Iter: IntoIterator<Item = T>,

Extends a collection with the contents of an iterator. Read more
Source§

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)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl<T, S> FinSet for HashFinSet<T, S>
where T: Eq + Hash + Clone, S: BuildHasher,

Source§

fn iter(&self) -> impl Iterator<Item = T>

Iterates over elements of the finite set. Read more
Source§

fn len(&self) -> usize

The size of the finite set.
Source§

fn is_empty(&self) -> bool

Is the set empty?
Source§

impl<T, S> From<HashSet<T, S>> for HashFinSet<T, S>

Source§

fn from(value: HashSet<T, S>) -> Self

Converts to this type from the input type.
Source§

impl<T, S> IntoIterator for HashFinSet<T, S>
where T: Eq + Hash, S: BuildHasher,

Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T, S> PartialEq for HashFinSet<T, S>
where T: Eq + Hash, S: BuildHasher,

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T, S> Set for HashFinSet<T, S>
where T: Eq + Clone + Hash, S: BuildHasher,

Source§

type Elem = T

Type of elements of the set. Read more
Source§

fn contains(&self, x: &T) -> bool

Does the set contain the element x?
Source§

impl<T, S> Eq for HashFinSet<T, S>
where T: Eq + Hash, S: BuildHasher,