pub struct Hamt<K, V, A, I>(_);
Implementations
sourceimpl<K, V, A, I> Hamt<K, V, A, I> where
K: Archive<Archived = K> + Clone + Eq + Hash + for<'a> CheckBytes<DefaultValidator<'a>>,
V: Archive + Clone,
V::Archived: for<'a> CheckBytes<DefaultValidator<'a>>,
A: Annotation<KvPair<K, V>>,
Self: Archive,
<Hamt<K, V, A, I> as Archive>::Archived: ArchivedCompound<Self, A, I> + Deserialize<Self, StoreRef<I>> + for<'a> CheckBytes<DefaultValidator<'a>>,
I: Clone + for<'any> CheckBytes<DefaultValidator<'any>>,
impl<K, V, A, I> Hamt<K, V, A, I> where
K: Archive<Archived = K> + Clone + Eq + Hash + for<'a> CheckBytes<DefaultValidator<'a>>,
V: Archive + Clone,
V::Archived: for<'a> CheckBytes<DefaultValidator<'a>>,
A: Annotation<KvPair<K, V>>,
Self: Archive,
<Hamt<K, V, A, I> as Archive>::Archived: ArchivedCompound<Self, A, I> + Deserialize<Self, StoreRef<I>> + for<'a> CheckBytes<DefaultValidator<'a>>,
I: Clone + for<'any> CheckBytes<DefaultValidator<'any>>,
Trait Implementations
sourceimpl<K, V, A, I> Archive for Hamt<K, V, A, I> where
[Bucket<K, V, A, I>; 4]: Archive,
impl<K, V, A, I> Archive for Hamt<K, V, A, I> where
[Bucket<K, V, A, I>; 4]: Archive,
type Archived = ArchivedHamt<K, V, A, I>
type Archived = ArchivedHamt<K, V, A, I>
The archived representation of this type. Read more
type Resolver = HamtResolver<K, V, A, I>
type Resolver = HamtResolver<K, V, A, I>
The resolver for this type. It must contain all the additional information from serializing needed to make the archived type from the normal type. Read more
sourceimpl<K, V, A, I> ArchivedCompound<Hamt<K, V, A, I>, A, I> for ArchivedHamt<K, V, A, I> where
K: Archive,
V: Archive,
A: Annotation<KvPair<K, V>>,
impl<K, V, A, I> ArchivedCompound<Hamt<K, V, A, I>, A, I> for ArchivedHamt<K, V, A, I> where
K: Archive,
V: Archive,
A: Annotation<KvPair<K, V>>,
sourcefn child(&self, ofs: usize) -> ArchivedChild<'_, Hamt<K, V, A, I>, A, I>
fn child(&self, ofs: usize) -> ArchivedChild<'_, Hamt<K, V, A, I>, A, I>
Returns an archived child
sourceimpl<K, V, A, I> Compound<A, I> for Hamt<K, V, A, I> where
K: Archive,
V: Archive,
A: Annotation<KvPair<K, V>>,
impl<K, V, A, I> Compound<A, I> for Hamt<K, V, A, I> where
K: Archive,
V: Archive,
A: Annotation<KvPair<K, V>>,
sourcefn child_mut(&mut self, ofs: usize) -> ChildMut<'_, Self, A, I>
fn child_mut(&mut self, ofs: usize) -> ChildMut<'_, Self, A, I>
Get a mutable reference to a child
sourcefn walk<'a, W>(&'a self, walker: W) -> Option<Branch<'a, Self, A, I>> where
W: Walker<Self, A, I>,
A: Annotation<Self::Leaf>,
Self::Archived: ArchivedCompound<Self, A, I>,
Self::Archived: for<'any> CheckBytes<DefaultValidator<'any>>,
Self::Leaf: 'a,
Self::Leaf: Archive,
fn walk<'a, W>(&'a self, walker: W) -> Option<Branch<'a, Self, A, I>> where
W: Walker<Self, A, I>,
A: Annotation<Self::Leaf>,
Self::Archived: ArchivedCompound<Self, A, I>,
Self::Archived: for<'any> CheckBytes<DefaultValidator<'any>>,
Self::Leaf: 'a,
Self::Leaf: Archive,
Constructs a branch from this root compound
sourcefn walk_mut<W>(&'a mut self, walker: W) -> Option<BranchMut<'a, Self, A, I>> where
Self: Clone,
A: Annotation<Self::Leaf>,
W: Walker<Self, A, I>,
Self::Archived: Deserialize<Self, StoreRef<I>>,
Self::Archived: for<'any> CheckBytes<DefaultValidator<'any>>,
Self::Leaf: Archive,
fn walk_mut<W>(&'a mut self, walker: W) -> Option<BranchMut<'a, Self, A, I>> where
Self: Clone,
A: Annotation<Self::Leaf>,
W: Walker<Self, A, I>,
Self::Archived: Deserialize<Self, StoreRef<I>>,
Self::Archived: for<'any> CheckBytes<DefaultValidator<'any>>,
Self::Leaf: Archive,
Constructs a mutable branch from this root compound
sourceimpl<K, V, A, I> Default for Hamt<K, V, A, I> where
A: Annotation<KvPair<K, V>>,
impl<K, V, A, I> Default for Hamt<K, V, A, I> where
A: Annotation<KvPair<K, V>>,
sourceimpl<__D: Fallible + ?Sized, K, V, A, I> Deserialize<Hamt<K, V, A, I>, __D> for Archived<Hamt<K, V, A, I>> where
[Bucket<K, V, A, I>; 4]: Archive,
Archived<[Bucket<K, V, A, I>; 4]>: Deserialize<[Bucket<K, V, A, I>; 4], __D>,
impl<__D: Fallible + ?Sized, K, V, A, I> Deserialize<Hamt<K, V, A, I>, __D> for Archived<Hamt<K, V, A, I>> where
[Bucket<K, V, A, I>; 4]: Archive,
Archived<[Bucket<K, V, A, I>; 4]>: Deserialize<[Bucket<K, V, A, I>; 4], __D>,
sourceimpl<K, V, A, I> Lookup<Hamt<K, V, A, I>, K, V, A, I> for Hamt<K, V, A, I> where
K: Archive + Hash,
K::Archived: for<'any> CheckBytes<DefaultValidator<'any>>,
V: Archive,
V::Archived: for<'any> CheckBytes<DefaultValidator<'any>>,
A: Annotation<KvPair<K, V>>,
A::Archived: for<'any> CheckBytes<DefaultValidator<'any>>,
I: Archive + for<'any> CheckBytes<DefaultValidator<'any>>,
K: Eq,
K: Archive<Archived = K>,
impl<K, V, A, I> Lookup<Hamt<K, V, A, I>, K, V, A, I> for Hamt<K, V, A, I> where
K: Archive + Hash,
K::Archived: for<'any> CheckBytes<DefaultValidator<'any>>,
V: Archive,
V::Archived: for<'any> CheckBytes<DefaultValidator<'any>>,
A: Annotation<KvPair<K, V>>,
A::Archived: for<'any> CheckBytes<DefaultValidator<'any>>,
I: Archive + for<'any> CheckBytes<DefaultValidator<'any>>,
K: Eq,
K: Archive<Archived = K>,
fn get(
&self,
key: &K
) -> Option<MappedBranch<'_, Self, A, I, MaybeArchived<'_, V>>>
sourceimpl<K, V, A, I> Lookup<Hamt<K, V, A, I>, K, V, A, I> for Stored<Hamt<K, V, A, I>, I> where
K: 'static + Archive + Hash,
K::Archived: for<'any> CheckBytes<DefaultValidator<'any>>,
V: 'static + Archive,
V::Archived: for<'any> CheckBytes<DefaultValidator<'any>>,
A: Annotation<KvPair<K, V>>,
A::Archived: for<'any> CheckBytes<DefaultValidator<'any>>,
I: Archive + for<'any> CheckBytes<DefaultValidator<'any>>,
K: Eq,
K: Archive<Archived = K>,
impl<K, V, A, I> Lookup<Hamt<K, V, A, I>, K, V, A, I> for Stored<Hamt<K, V, A, I>, I> where
K: 'static + Archive + Hash,
K::Archived: for<'any> CheckBytes<DefaultValidator<'any>>,
V: 'static + Archive,
V::Archived: for<'any> CheckBytes<DefaultValidator<'any>>,
A: Annotation<KvPair<K, V>>,
A::Archived: for<'any> CheckBytes<DefaultValidator<'any>>,
I: Archive + for<'any> CheckBytes<DefaultValidator<'any>>,
K: Eq,
K: Archive<Archived = K>,
fn get(
&self,
key: &K
) -> Option<MappedBranch<'_, Hamt<K, V, A, I>, A, I, MaybeArchived<'_, V>>>
Auto Trait Implementations
impl<K, V, A, I> !RefUnwindSafe for Hamt<K, V, A, I>
impl<K, V, A, I> !Send for Hamt<K, V, A, I>
impl<K, V, A, I> !Sync for Hamt<K, V, A, I>
impl<K, V, A, I> Unpin for Hamt<K, V, A, I> where
A: Unpin,
I: Unpin,
K: Unpin,
V: Unpin,
impl<K, V, A, I> !UnwindSafe for Hamt<K, V, A, I>
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> ArchiveUnsized for T where
T: Archive,
impl<T> ArchiveUnsized for T where
T: Archive,
type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
The archived counterpart of this type. Unlike Archive
, it may be unsized. Read more
type MetadataResolver = ()
type MetadataResolver = ()
The resolver for the metadata of this type. Read more
sourceunsafe fn resolve_metadata(
&self,
usize,
<T as ArchiveUnsized>::MetadataResolver,
*mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
)
unsafe fn resolve_metadata(
&self,
usize,
<T as ArchiveUnsized>::MetadataResolver,
*mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
)
Creates the archived version of the metadata for this value at the given position and writes it to the given output. Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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