Trait miniconf::Walk

source ·
pub trait Walk: Sized {
    type Error;

    // Required methods
    fn internal() -> Self;
    fn leaf() -> Self;
    fn merge(
        self,
        walk: &Self,
        index: Option<usize>,
        lookup: &KeyLookup,
    ) -> Result<Self, Self::Error>;
}
Expand description

Capability to be walked through a TreeKey using traverse_all().

Required Associated Types§

source

type Error

Error type for merge()

Required Methods§

source

fn internal() -> Self

Return the walk starting point for an an empty internal node

source

fn leaf() -> Self

Return the walk starting point for a single leaf node

source

fn merge( self, walk: &Self, index: Option<usize>, lookup: &KeyLookup, ) -> Result<Self, Self::Error>

Merge node metadata into self.

§Args
  • walk: The walk of the node to merge.
  • index: Either the node index in case of a single node or None, in case of lookup.len nodes of homogeneous type.
  • lookup: The namespace the node(s) are in.

Object Safety§

This trait is not object safe.

Implementors§