Struct rkyv::collections::btree_set::ArchivedBTreeSet
source · [−]#[repr(transparent)]pub struct ArchivedBTreeSet<K>(_);
Expand description
An archived BTreeSet
. This is a wrapper around a B-tree map with the same key and a value of
()
.
Implementations
sourceimpl<K> ArchivedBTreeSet<K>
impl<K> ArchivedBTreeSet<K>
sourcepub fn contains_key<Q: Ord + ?Sized>(&self, key: &Q) -> boolwhere
K: Borrow<Q> + Ord,
pub fn contains_key<Q: Ord + ?Sized>(&self, key: &Q) -> boolwhere
K: Borrow<Q> + Ord,
Returns true
if the set contains a value for the specified key.
The key may be any borrowed form of the set’s key type, but the ordering on the borrowed form must match the ordering on the key type.
sourcepub fn get<Q: Ord + ?Sized>(&self, value: &Q) -> Option<&K>where
K: Borrow<Q> + Ord,
pub fn get<Q: Ord + ?Sized>(&self, value: &Q) -> Option<&K>where
K: Borrow<Q> + Ord,
Returns a reference to the value int he set, if any, that is equal to the given value.
The value may be any borrowed form of the set’s value type, but the ordering on the borrowed form must match the ordering on the value type.
sourcepub fn iter(&self) -> Keys<'_, K, ()>ⓘNotable traits for Keys<'a, K, V>impl<'a, K, V> Iterator for Keys<'a, K, V> type Item = &'a K;
pub fn iter(&self) -> Keys<'_, K, ()>ⓘNotable traits for Keys<'a, K, V>impl<'a, K, V> Iterator for Keys<'a, K, V> type Item = &'a K;
Gets an iterator over the keys of the set, in sorted order.
sourcepub unsafe fn resolve_from_len(
len: usize,
pos: usize,
resolver: BTreeSetResolver,
out: *mut Self
)
pub unsafe fn resolve_from_len(
len: usize,
pos: usize,
resolver: BTreeSetResolver,
out: *mut Self
)
Resolves a B-tree set from its length.
Safety
len
must be the number of elements that were serializedpos
must be the position ofout
within the archiveresolver
must be the result of serializing a B-tree set
Trait Implementations
sourceimpl<K: Debug> Debug for ArchivedBTreeSet<K>
impl<K: Debug> Debug for ArchivedBTreeSet<K>
sourceimpl<K, D> Deserialize<BTreeSet<K, Global>, D> for ArchivedBTreeSet<K::Archived>where
K: Archive + Ord,
K::Archived: Deserialize<K, D> + Ord,
D: Fallible + ?Sized,
impl<K, D> Deserialize<BTreeSet<K, Global>, D> for ArchivedBTreeSet<K::Archived>where
K: Archive + Ord,
K::Archived: Deserialize<K, D> + Ord,
D: Fallible + ?Sized,
sourceimpl<K: Hash> Hash for ArchivedBTreeSet<K>
impl<K: Hash> Hash for ArchivedBTreeSet<K>
sourceimpl<'a, K> IntoIterator for &'a ArchivedBTreeSet<K>
impl<'a, K> IntoIterator for &'a ArchivedBTreeSet<K>
sourceimpl<K: Ord> Ord for ArchivedBTreeSet<K>
impl<K: Ord> Ord for ArchivedBTreeSet<K>
sourcefn cmp(&self, other: &ArchivedBTreeSet<K>) -> Ordering
fn cmp(&self, other: &ArchivedBTreeSet<K>) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<K, AK: PartialEq<K>> PartialEq<ArchivedBTreeSet<AK>> for BTreeSet<K>
impl<K, AK: PartialEq<K>> PartialEq<ArchivedBTreeSet<AK>> for BTreeSet<K>
sourcefn eq(&self, other: &ArchivedBTreeSet<AK>) -> bool
fn eq(&self, other: &ArchivedBTreeSet<AK>) -> bool
sourceimpl<K: PartialEq> PartialEq<ArchivedBTreeSet<K>> for ArchivedBTreeSet<K>
impl<K: PartialEq> PartialEq<ArchivedBTreeSet<K>> for ArchivedBTreeSet<K>
sourcefn eq(&self, other: &ArchivedBTreeSet<K>) -> bool
fn eq(&self, other: &ArchivedBTreeSet<K>) -> bool
sourceimpl<K, AK: PartialEq<K>> PartialEq<BTreeSet<K, Global>> for ArchivedBTreeSet<AK>
impl<K, AK: PartialEq<K>> PartialEq<BTreeSet<K, Global>> for ArchivedBTreeSet<AK>
sourceimpl<K: PartialOrd> PartialOrd<ArchivedBTreeSet<K>> for ArchivedBTreeSet<K>
impl<K: PartialOrd> PartialOrd<ArchivedBTreeSet<K>> for ArchivedBTreeSet<K>
sourcefn partial_cmp(&self, other: &ArchivedBTreeSet<K>) -> Option<Ordering>
fn partial_cmp(&self, other: &ArchivedBTreeSet<K>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<K: Eq> Eq for ArchivedBTreeSet<K>
impl<K> StructuralEq for ArchivedBTreeSet<K>
impl<K> StructuralPartialEq for ArchivedBTreeSet<K>
Auto Trait Implementations
impl<K> RefUnwindSafe for ArchivedBTreeSet<K>where
K: RefUnwindSafe,
impl<K> Send for ArchivedBTreeSet<K>where
K: Send,
impl<K> Sync for ArchivedBTreeSet<K>where
K: Sync,
impl<K> !Unpin for ArchivedBTreeSet<K>
impl<K> UnwindSafe for ArchivedBTreeSet<K>where
K: UnwindSafe,
Blanket Implementations
sourceimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcefn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more