pub struct DistinctNames(/* private fields */);Expand description
Ordered set of distinct column names
Implementations§
Methods from Deref<Target = IndexSet<Name>>§
Sourcepub fn capacity(&self) -> usize
pub fn capacity(&self) -> usize
Return the number of elements the set can hold without reallocating.
This number is a lower bound; the set might be able to hold more, but is guaranteed to be able to hold at least this many.
Computes in O(1) time.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if the set contains no elements.
Computes in O(1) time.
Sourcepub fn iter(&self) -> Iter<'_, T>
pub fn iter(&self) -> Iter<'_, T>
Return an iterator over the values of the set, in their order
Sourcepub fn difference<'a, S2>(
&'a self,
other: &'a IndexSet<T, S2>,
) -> Difference<'a, T, S2>where
S2: BuildHasher,
pub fn difference<'a, S2>(
&'a self,
other: &'a IndexSet<T, S2>,
) -> Difference<'a, T, S2>where
S2: BuildHasher,
Return an iterator over the values that are in self but not other.
Values are produced in the same order that they appear in self.
Sourcepub fn symmetric_difference<'a, S2>(
&'a self,
other: &'a IndexSet<T, S2>,
) -> SymmetricDifference<'a, T, S, S2>where
S2: BuildHasher,
pub fn symmetric_difference<'a, S2>(
&'a self,
other: &'a IndexSet<T, S2>,
) -> SymmetricDifference<'a, T, S, S2>where
S2: BuildHasher,
Return an iterator over the values that are in self or other,
but not in both.
Values from self are produced in their original order, followed by
values from other in their original order.
Sourcepub fn intersection<'a, S2>(
&'a self,
other: &'a IndexSet<T, S2>,
) -> Intersection<'a, T, S2>where
S2: BuildHasher,
pub fn intersection<'a, S2>(
&'a self,
other: &'a IndexSet<T, S2>,
) -> Intersection<'a, T, S2>where
S2: BuildHasher,
Return an iterator over the values that are in both self and other.
Values are produced in the same order that they appear in self.
Sourcepub fn union<'a, S2>(&'a self, other: &'a IndexSet<T, S2>) -> Union<'a, T, S>where
S2: BuildHasher,
pub fn union<'a, S2>(&'a self, other: &'a IndexSet<T, S2>) -> Union<'a, T, S>where
S2: BuildHasher,
Return an iterator over all values that are in self or other.
Values from self are produced in their original order, followed by
values that are unique to other in their original order.
Sourcepub fn contains<Q>(&self, value: &Q) -> bool
pub fn contains<Q>(&self, value: &Q) -> bool
Return true if an equivalent to value exists in the set.
Computes in O(1) time (average).
Sourcepub fn get<Q>(&self, value: &Q) -> Option<&T>
pub fn get<Q>(&self, value: &Q) -> Option<&T>
Return a reference to the value stored in the set, if it is present,
else None.
Computes in O(1) time (average).
Sourcepub fn get_index_of<Q>(&self, value: &Q) -> Option<usize>
pub fn get_index_of<Q>(&self, value: &Q) -> Option<usize>
Return item index, if it exists in the set
Computes in O(1) time (average).
Sourcepub fn binary_search(&self, x: &T) -> Result<usize, usize>where
T: Ord,
pub fn binary_search(&self, x: &T) -> Result<usize, usize>where
T: Ord,
Search over a sorted set for a value.
Returns the position where that value is present, or the position where it can be inserted
to maintain the sort. See slice::binary_search for more details.
Computes in O(log(n)) time, which is notably less scalable than looking the value up
using get_index_of, but this can also position missing values.
Sourcepub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
Search over a sorted set with a comparator function.
Returns the position where that value is present, or the position where it can be inserted
to maintain the sort. See slice::binary_search_by for more details.
Computes in O(log(n)) time.
Sourcepub fn binary_search_by_key<'a, B, F>(
&'a self,
b: &B,
f: F,
) -> Result<usize, usize>
pub fn binary_search_by_key<'a, B, F>( &'a self, b: &B, f: F, ) -> Result<usize, usize>
Search over a sorted set with an extraction function.
Returns the position where that value is present, or the position where it can be inserted
to maintain the sort. See slice::binary_search_by_key for more details.
Computes in O(log(n)) time.
Sourcepub fn partition_point<P>(&self, pred: P) -> usize
pub fn partition_point<P>(&self, pred: P) -> usize
Returns the index of the partition point of a sorted set according to the given predicate (the index of the first element of the second partition).
See slice::partition_point for more details.
Computes in O(log(n)) time.
Sourcepub fn as_slice(&self) -> &Slice<T>
pub fn as_slice(&self) -> &Slice<T>
Returns a slice of all the values in the set.
Computes in O(1) time.
Sourcepub fn get_index(&self, index: usize) -> Option<&T>
pub fn get_index(&self, index: usize) -> Option<&T>
Get a value by index
Valid indices are 0 <= index < self.len().
Computes in O(1) time.
Sourcepub fn get_range<R>(&self, range: R) -> Option<&Slice<T>>where
R: RangeBounds<usize>,
pub fn get_range<R>(&self, range: R) -> Option<&Slice<T>>where
R: RangeBounds<usize>,
Returns a slice of values in the given range of indices.
Valid indices are 0 <= index < self.len().
Computes in O(1) time.
Sourcepub fn is_disjoint<S2>(&self, other: &IndexSet<T, S2>) -> boolwhere
S2: BuildHasher,
pub fn is_disjoint<S2>(&self, other: &IndexSet<T, S2>) -> boolwhere
S2: BuildHasher,
Returns true if self has no elements in common with other.
Sourcepub fn is_subset<S2>(&self, other: &IndexSet<T, S2>) -> boolwhere
S2: BuildHasher,
pub fn is_subset<S2>(&self, other: &IndexSet<T, S2>) -> boolwhere
S2: BuildHasher,
Returns true if all elements of self are contained in other.
Sourcepub fn is_superset<S2>(&self, other: &IndexSet<T, S2>) -> boolwhere
S2: BuildHasher,
pub fn is_superset<S2>(&self, other: &IndexSet<T, S2>) -> boolwhere
S2: BuildHasher,
Returns true if all elements of other are contained in self.
Trait Implementations§
Source§impl Clone for DistinctNames
impl Clone for DistinctNames
Source§fn clone(&self) -> DistinctNames
fn clone(&self) -> DistinctNames
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DistinctNames
impl Debug for DistinctNames
Source§impl Deref for DistinctNames
impl Deref for DistinctNames
Source§impl PartialEq for DistinctNames
impl PartialEq for DistinctNames
impl Eq for DistinctNames
impl StructuralPartialEq for DistinctNames
Auto Trait Implementations§
impl Freeze for DistinctNames
impl RefUnwindSafe for DistinctNames
impl Send for DistinctNames
impl Sync for DistinctNames
impl Unpin for DistinctNames
impl UnwindSafe for DistinctNames
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.