pub struct InlineScanSet<T, const SZ: usize> { /* private fields */ }Expand description
A general-purpose set implemented using linear scanning.
This type is an implementation detail of the `frozen_collections` crate.
This API is therefore not stable and may change at any time. Please do not
use this type directly, and instead use the public API provided by the
`frozen_collections` crate.
A frozen collection differs from the traditional Rust collections, such as
[`HashMap`](std::collections::HashMap) and [`HashSet`](std::collections::HashSet) types in three
key ways. First, creating a frozen collection performs an analysis over the input data to
determine the best implementation strategy. Depending on the situation, this analysis is
performed at build time or runtime, and it can take a relatively long time when a collection is
very large. Second, once created, the keys in frozen collections are immutable. And third,
querying a frozen collection is typically considerably faster, which is the whole point.
§Type Parameters
T: The value type.SZ: The number of entries in the set.
Implementations§
Source§impl<T, const SZ: usize> InlineScanSet<T, SZ>
impl<T, const SZ: usize> InlineScanSet<T, SZ>
Sourcepub const fn new(map: InlineScanMap<T, (), SZ>) -> Self
pub const fn new(map: InlineScanMap<T, (), SZ>) -> Self
Creates a frozen set.
Sourcepub fn get<Q>(&self, value: &Q) -> Option<&T>where
Q: ?Sized + Equivalent<T>,
pub fn get<Q>(&self, value: &Q) -> Option<&T>where
Q: ?Sized + Equivalent<T>,
Gets a reference to a value in the set.
Trait Implementations§
Source§impl<T: Clone, const SZ: usize> Clone for InlineScanSet<T, SZ>
impl<T: Clone, const SZ: usize> Clone for InlineScanSet<T, SZ>
Source§fn clone(&self) -> InlineScanSet<T, SZ>
fn clone(&self) -> InlineScanSet<T, SZ>
Returns a duplicate 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<'a, T, const SZ: usize> IntoIterator for &'a InlineScanSet<T, SZ>
impl<'a, T, const SZ: usize> IntoIterator for &'a InlineScanSet<T, SZ>
Source§impl<T, const SZ: usize> IntoIterator for InlineScanSet<T, SZ>
impl<T, const SZ: usize> IntoIterator for InlineScanSet<T, SZ>
Source§impl<T, const SZ: usize> Len for InlineScanSet<T, SZ>
impl<T, const SZ: usize> Len for InlineScanSet<T, SZ>
Source§impl<T, ST, const SZ: usize> PartialEq<ST> for InlineScanSet<T, SZ>
impl<T, ST, const SZ: usize> PartialEq<ST> for InlineScanSet<T, SZ>
Source§impl<T, const SZ: usize> Serialize for InlineScanSet<T, SZ>where
T: Serialize,
Available on crate feature serde only.
impl<T, const SZ: usize> Serialize for InlineScanSet<T, SZ>where
T: Serialize,
Available on crate feature
serde only.Source§impl<T, Q, const SZ: usize> SetExtras<T, Q> for InlineScanSet<T, SZ>where
Q: ?Sized + Equivalent<T>,
impl<T, Q, const SZ: usize> SetExtras<T, Q> for InlineScanSet<T, SZ>where
Q: ?Sized + Equivalent<T>,
Source§impl<T, const SZ: usize> SetIteration<T> for InlineScanSet<T, SZ>
impl<T, const SZ: usize> SetIteration<T> for InlineScanSet<T, SZ>
Source§impl<T, Q, const SZ: usize> SetQuery<Q> for InlineScanSet<T, SZ>where
Q: ?Sized + Equivalent<T>,
impl<T, Q, const SZ: usize> SetQuery<Q> for InlineScanSet<T, SZ>where
Q: ?Sized + Equivalent<T>,
impl<T, const SZ: usize> Eq for InlineScanSet<T, SZ>where
T: Eq,
impl<T, Q, const SZ: usize> Set<T, Q> for InlineScanSet<T, SZ>where
Q: ?Sized + Equivalent<T>,
Auto Trait Implementations§
impl<T, const SZ: usize> Freeze for InlineScanSet<T, SZ>where
T: Freeze,
impl<T, const SZ: usize> RefUnwindSafe for InlineScanSet<T, SZ>where
T: RefUnwindSafe,
impl<T, const SZ: usize> Send for InlineScanSet<T, SZ>where
T: Send,
impl<T, const SZ: usize> Sync for InlineScanSet<T, SZ>where
T: Sync,
impl<T, const SZ: usize> Unpin for InlineScanSet<T, SZ>where
T: Unpin,
impl<T, const SZ: usize> UnsafeUnpin for InlineScanSet<T, SZ>where
T: UnsafeUnpin,
impl<T, const SZ: usize> UnwindSafe for InlineScanSet<T, SZ>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<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
Compare self to
key and return true if they are equal.Source§impl<ST, T> SetOps<T> for STwhere
ST: Set<T>,
impl<ST, T> SetOps<T> for STwhere
ST: Set<T>,
Source§fn union<'a, ST>(&'a self, other: &'a ST) -> Union<'a, Self, ST, T> ⓘ
fn union<'a, ST>(&'a self, other: &'a ST) -> Union<'a, Self, ST, T> ⓘ
Visits the values representing the union,
i.e., all the values in
self or other, without duplicates.Source§fn symmetric_difference<'a, ST>(
&'a self,
other: &'a ST,
) -> SymmetricDifference<'a, Self, ST, T> ⓘ
fn symmetric_difference<'a, ST>( &'a self, other: &'a ST, ) -> SymmetricDifference<'a, Self, ST, T> ⓘ
Visits the values representing the symmetric difference,
i.e., the values that are in
self or in other but not in both.Source§fn difference<'a, ST>(&'a self, other: &'a ST) -> Difference<'a, Self, ST, T> ⓘ
fn difference<'a, ST>(&'a self, other: &'a ST) -> Difference<'a, Self, ST, T> ⓘ
Visits the values representing the difference,
i.e., the values that are in
self but not in other.Source§fn intersection<'a, ST>(
&'a self,
other: &'a ST,
) -> Intersection<'a, Self, ST, T> ⓘ
fn intersection<'a, ST>( &'a self, other: &'a ST, ) -> Intersection<'a, Self, ST, T> ⓘ
Visits the values representing the intersection,
i.e., the values that are both in
self and other. Read moreSource§fn is_disjoint<'a, ST>(&'a self, other: &'a ST) -> bool
fn is_disjoint<'a, ST>(&'a self, other: &'a ST) -> bool
Returns
true if self has no entries in common with other.
This is equivalent to checking for an empty intersection.