Struct microkelvin::BranchMut [−][src]
pub struct BranchMut<'a, C, A, S>(_);
Expand description
Reprents a branch view into a collection.
BranchMut allows you to manipulate the value of the leaf, but disallows manipulating the branch nodes directly, to avoid breaking any datastructure invariants.
Branches are always guaranteed to point at a leaf, and can be dereferenced to the pointed-at leaf.
Implementations
Returns a branch that maps the leaf to a specific value. Used in maps for example, to get easy access to the value of the KV-pair
Returns a mutable reference to the leaf pointet to by the branch
pub fn walk<W>(root: &'a mut C, walker: W) -> Option<Self> where
C: Compound<A, S> + Clone,
A: Annotation<C::Leaf>,
C::Archived: ArchivedCompound<C, A, S> + Deserialize<C, S>,
C::Leaf: Archive,
W: Walker<C, A, S>,
pub fn walk<W>(root: &'a mut C, walker: W) -> Option<Self> where
C: Compound<A, S> + Clone,
A: Annotation<C::Leaf>,
C::Archived: ArchivedCompound<C, A, S> + Deserialize<C, S>,
C::Leaf: Archive,
W: Walker<C, A, S>,
Performs a tree walk, returning either a valid branch or None if the walk failed.
Trait Implementations
impl<'a, C, A, S> IntoIterator for BranchMut<'a, C, A, S> where
S: Store,
C: Compound<A, S> + Clone,
C::Leaf: 'a + Archive,
C::Archived: ArchivedCompound<C, A, S> + Deserialize<C, S>,
A: Annotation<C::Leaf>,
impl<'a, C, A, S> IntoIterator for BranchMut<'a, C, A, S> where
S: Store,
C: Compound<A, S> + Clone,
C::Leaf: 'a + Archive,
C::Archived: ArchivedCompound<C, A, S> + Deserialize<C, S>,
A: Annotation<C::Leaf>,
Auto Trait Implementations
impl<'a, C, A, S> RefUnwindSafe for BranchMut<'a, C, A, S> where
A: RefUnwindSafe,
C: RefUnwindSafe,
S: RefUnwindSafe,
impl<'a, C, A, S> !UnwindSafe for BranchMut<'a, C, A, S>
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more