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) -> bool where
K: Borrow<Q> + Ord,
pub fn contains_key<Q: Ord + ?Sized>(&self, key: &Q) -> bool where
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>, D> for ArchivedBTreeSet<K::Archived> where
K: Archive + Ord,
K::Archived: Deserialize<K, D> + Ord,
D: Fallible + ?Sized,
impl<K, D> Deserialize<BTreeSet<K>, 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>
sourceimpl<K, AK: PartialEq<K>> PartialEq<ArchivedBTreeSet<AK>> for BTreeSet<K>
impl<K, AK: PartialEq<K>> PartialEq<ArchivedBTreeSet<AK>> for BTreeSet<K>
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ArchivedBTreeSet<K>) -> bool
fn ne(&self, other: &ArchivedBTreeSet<K>) -> bool
This method tests for !=
.
sourceimpl<K, AK: PartialEq<K>> PartialEq<BTreeSet<K>> for ArchivedBTreeSet<AK>
impl<K, AK: PartialEq<K>> PartialEq<BTreeSet<K>> 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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
impl<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(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
fn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more