pub struct UnordBag<V> {
inner: Vec<V>,
}
Expand description
This is a collection type that tries very hard to not expose any internal iteration. This is a useful property when trying to uphold the determinism invariants imposed by the query system.
This collection type is a good choice for collections the
keys of which don’t have a semantic ordering and don’t implement
Hash
or Eq
.
See MCP 533 for more information.
Fields§
§inner: Vec<V>
Implementations§
Trait Implementations§
Source§impl<T> Extend<T> for UnordBag<T>
impl<T> Extend<T> for UnordBag<T>
Source§fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
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)
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, I: Iterator<Item = T>> From<UnordItems<T, I>> for UnordBag<T>
impl<T, I: Iterator<Item = T>> From<UnordItems<T, I>> for UnordBag<T>
Source§fn from(value: UnordItems<T, I>) -> Self
fn from(value: UnordItems<T, I>) -> Self
Converts to this type from the input type.
Source§impl<HCX, V: Hash + Eq + HashStable<HCX>> HashStable<HCX> for UnordBag<V>
impl<HCX, V: Hash + Eq + HashStable<HCX>> HashStable<HCX> for UnordBag<V>
fn hash_stable(&self, hcx: &mut HCX, hasher: &mut StableHasher)
impl<V: Eq> Eq for UnordBag<V>
impl<T> !IntoIterator for UnordBag<T>
impl<V> StructuralPartialEq for UnordBag<V>
impl<T> UnordCollection for UnordBag<T>
Auto Trait Implementations§
impl<V> DynSend for UnordBag<V>where
V: DynSend,
impl<V> DynSync for UnordBag<V>where
V: DynSync,
impl<V> Freeze for UnordBag<V>
impl<V> RefUnwindSafe for UnordBag<V>where
V: RefUnwindSafe,
impl<V> Send for UnordBag<V>where
V: Send,
impl<V> Sync for UnordBag<V>where
V: Sync,
impl<V> Unpin for UnordBag<V>where
V: Unpin,
impl<V> UnwindSafe for UnordBag<V>where
V: 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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§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<C, T> ExtendUnord<T> for Cwhere
C: Extend<T> + UnordCollection,
impl<C, T> ExtendUnord<T> for Cwhere
C: Extend<T> + UnordCollection,
Source§fn extend_unord<I>(&mut self, items: UnordItems<T, I>)where
I: Iterator<Item = T>,
fn extend_unord<I>(&mut self, items: UnordItems<T, I>)where
I: Iterator<Item = T>,
Extend this unord collection with the given
UnordItems
.
This method is called extend_unord
instead of just extend
so it
does not conflict with Extend::extend
. Otherwise there would be many
places where the two methods would have to be explicitly disambiguated
via UFCS.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes