Struct microkelvin::Branch [−][src]
Expand description
Reprents an immutable branch view into a collection.
Branche are always guaranteed to point at a leaf, and can be dereferenced to the pointed-at leaf.
Implementations
pub fn map_leaf<M>(
self,
closure: fn(_: MaybeArchived<'a, C::Leaf>) -> M
) -> MappedBranch<'a, C, A, S, M> where
C: Compound<A, S>,
M: 'a,
pub fn map_leaf<M>(
self,
closure: fn(_: MaybeArchived<'a, C::Leaf>) -> M
) -> MappedBranch<'a, C, A, S, M> where
C: Compound<A, S>,
M: 'a,
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 reference to the currently pointed-at leaf
pub fn walk<W>(root: MaybeArchived<'a, C>, walker: W) -> Option<Self> where
C: Compound<A, S>,
W: Walker<C, A, S>,
A: Annotation<C::Leaf>,
pub fn walk<W>(root: MaybeArchived<'a, C>, walker: W) -> Option<Self> where
C: Compound<A, S>,
W: Walker<C, A, S>,
A: Annotation<C::Leaf>,
Performs a tree walk, returning either a valid branch or None if the walk failed.
pub fn walk_with_store<W>(
root: MaybeArchived<'a, C>,
walker: W,
store: S
) -> Option<Self> where
C: Compound<A, S>,
W: Walker<C, A, S>,
A: Annotation<C::Leaf>,
pub fn walk_with_store<W>(
root: MaybeArchived<'a, C>,
walker: W,
store: S
) -> Option<Self> where
C: Compound<A, S>,
W: Walker<C, A, S>,
A: Annotation<C::Leaf>,
Performs a tree walk, returning either a valid branch or None if the walk failed.
Trait Implementations
impl<'a, C, A, S> IntoIterator for Branch<'a, C, A, S> where
S: Store,
C: Compound<A, S>,
C::Leaf: 'a + Archive,
C::Archived: ArchivedCompound<C, A, S>,
A: Annotation<C::Leaf>,
impl<'a, C, A, S> IntoIterator for Branch<'a, C, A, S> where
S: Store,
C: Compound<A, S>,
C::Leaf: 'a + Archive,
C::Archived: ArchivedCompound<C, A, S>,
A: Annotation<C::Leaf>,
Auto Trait Implementations
impl<'a, C, A, S> RefUnwindSafe for Branch<'a, C, A, S> where
A: RefUnwindSafe,
C: RefUnwindSafe,
S: RefUnwindSafe,
<C as Archive>::Archived: RefUnwindSafe,
impl<'a, C, A, S> Send for Branch<'a, C, A, S> where
A: Send,
C: Sync,
S: Send,
<C as Archive>::Archived: Sync,
impl<'a, C, A, S> Sync for Branch<'a, C, A, S> where
A: Sync,
C: Sync,
S: Sync,
<C as Archive>::Archived: Sync,
impl<'a, C, A, S> UnwindSafe for Branch<'a, C, A, S> where
A: UnwindSafe,
C: RefUnwindSafe,
S: UnwindSafe,
<C as Archive>::Archived: RefUnwindSafe,
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