Struct rkyv::collections::btree_map::ArchivedBTreeMap
source · [−]pub struct ArchivedBTreeMap<K, V> { /* private fields */ }
Expand description
An archived BTreeMap
.
Implementations
sourceimpl<K, V> ArchivedBTreeMap<K, V>
impl<K, V> ArchivedBTreeMap<K, V>
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 map contains a value for the specified key.
The key may be any borrowed form of the map’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, key: &Q) -> Option<&V> where
K: Borrow<Q> + Ord,
pub fn get<Q: Ord + ?Sized>(&self, key: &Q) -> Option<&V> where
K: Borrow<Q> + Ord,
Returns a reference to the value corresponding to the key.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
sourcepub fn get_key_value<Q: Ord + ?Sized>(&self, k: &Q) -> Option<(&K, &V)> where
K: Borrow<Q> + Ord,
pub fn get_key_value<Q: Ord + ?Sized>(&self, k: &Q) -> Option<(&K, &V)> where
K: Borrow<Q> + Ord,
Returns the key-value pair corresponding to the supplied key.
The supplied key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
sourcepub fn iter(&self) -> Iter<'_, K, V>ⓘNotable traits for Iter<'a, K, V>impl<'a, K, V> Iterator for Iter<'a, K, V> type Item = (&'a K, &'a V);
pub fn iter(&self) -> Iter<'_, K, V>ⓘNotable traits for Iter<'a, K, V>impl<'a, K, V> Iterator for Iter<'a, K, V> type Item = (&'a K, &'a V);
Gets an iterator over the entries of the map, sorted by key.
sourcepub fn keys(&self) -> Keys<'_, K, V>ⓘNotable traits for Keys<'a, K, V>impl<'a, K, V> Iterator for Keys<'a, K, V> type Item = &'a K;
pub fn keys(&self) -> Keys<'_, K, V>ⓘ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 map, in sorted order.
sourcepub fn values(&self) -> Values<'_, K, V>ⓘNotable traits for Values<'a, K, V>impl<'a, K, V> Iterator for Values<'a, K, V> type Item = &'a V;
pub fn values(&self) -> Values<'_, K, V>ⓘNotable traits for Values<'a, K, V>impl<'a, K, V> Iterator for Values<'a, K, V> type Item = &'a V;
Gets an iterator over the values of the map, in order by key.
sourcepub unsafe fn resolve_from_len(
len: usize,
pos: usize,
resolver: BTreeMapResolver,
out: *mut Self
)
pub unsafe fn resolve_from_len(
len: usize,
pos: usize,
resolver: BTreeMapResolver,
out: *mut Self
)
Resolves a B-tree map 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 map
Trait Implementations
sourceimpl<K: Debug, V: Debug> Debug for ArchivedBTreeMap<K, V>
impl<K: Debug, V: Debug> Debug for ArchivedBTreeMap<K, V>
sourceimpl<K: Archive + Ord, V: Archive, D: Fallible + ?Sized> Deserialize<BTreeMap<K, V>, D> for ArchivedBTreeMap<K::Archived, V::Archived> where
K::Archived: Deserialize<K, D> + Ord,
V::Archived: Deserialize<V, D>,
impl<K: Archive + Ord, V: Archive, D: Fallible + ?Sized> Deserialize<BTreeMap<K, V>, D> for ArchivedBTreeMap<K::Archived, V::Archived> where
K::Archived: Deserialize<K, D> + Ord,
V::Archived: Deserialize<V, D>,
sourceimpl<K: Hash, V: Hash> Hash for ArchivedBTreeMap<K, V>
impl<K: Hash, V: Hash> Hash for ArchivedBTreeMap<K, V>
sourceimpl<K, Q, V> Index<&'_ Q> for ArchivedBTreeMap<K, V> where
K: Borrow<Q> + Ord,
Q: Ord + ?Sized,
impl<K, Q, V> Index<&'_ Q> for ArchivedBTreeMap<K, V> where
K: Borrow<Q> + Ord,
Q: Ord + ?Sized,
sourceimpl<'a, K, V> IntoIterator for &'a ArchivedBTreeMap<K, V>
impl<'a, K, V> IntoIterator for &'a ArchivedBTreeMap<K, V>
sourceimpl<K: Ord, V: Ord> Ord for ArchivedBTreeMap<K, V>
impl<K: Ord, V: Ord> Ord for ArchivedBTreeMap<K, V>
sourceimpl<K, V, AK: PartialEq<K>, AV: PartialEq<V>> PartialEq<ArchivedBTreeMap<AK, AV>> for BTreeMap<K, V>
impl<K, V, AK: PartialEq<K>, AV: PartialEq<V>> PartialEq<ArchivedBTreeMap<AK, AV>> for BTreeMap<K, V>
sourceimpl<K: PartialEq, V: PartialEq> PartialEq<ArchivedBTreeMap<K, V>> for ArchivedBTreeMap<K, V>
impl<K: PartialEq, V: PartialEq> PartialEq<ArchivedBTreeMap<K, V>> for ArchivedBTreeMap<K, V>
sourceimpl<K, V, AK: PartialEq<K>, AV: PartialEq<V>> PartialEq<BTreeMap<K, V>> for ArchivedBTreeMap<AK, AV>
impl<K, V, AK: PartialEq<K>, AV: PartialEq<V>> PartialEq<BTreeMap<K, V>> for ArchivedBTreeMap<AK, AV>
sourceimpl<K: PartialOrd, V: PartialOrd> PartialOrd<ArchivedBTreeMap<K, V>> for ArchivedBTreeMap<K, V>
impl<K: PartialOrd, V: PartialOrd> PartialOrd<ArchivedBTreeMap<K, V>> for ArchivedBTreeMap<K, V>
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> 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, V: Eq> Eq for ArchivedBTreeMap<K, V>
Auto Trait Implementations
impl<K, V> RefUnwindSafe for ArchivedBTreeMap<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for ArchivedBTreeMap<K, V> where
K: Send,
V: Send,
impl<K, V> Sync for ArchivedBTreeMap<K, V> where
K: Sync,
V: Sync,
impl<K, V> !Unpin for ArchivedBTreeMap<K, V>
impl<K, V> UnwindSafe for ArchivedBTreeMap<K, V> where
K: UnwindSafe,
V: 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