Trait rsonpath::classification::depth::DepthIterator
source · pub trait DepthIterator<'a, I: Input, Q, const N: usize>: FallibleIterator<Item = Self::Block, Error = InputError> + 'a {
type Block: DepthBlock<'a>;
// Required methods
fn resume(
state: ResumeClassifierState<'a, I, Q, N>,
opening: BracketType
) -> (Option<Self::Block>, Self);
fn stop(
self,
block: Option<Self::Block>
) -> ResumeClassifierState<'a, I, Q, N>;
}
Expand description
Trait for depth iterators, i.e. finite iterators returning depth information about JSON documents.
Required Associated Types§
sourcetype Block: DepthBlock<'a>
type Block: DepthBlock<'a>
Type of the DepthBlock
implementation used by this iterator.
Required Methods§
sourcefn resume(
state: ResumeClassifierState<'a, I, Q, N>,
opening: BracketType
) -> (Option<Self::Block>, Self)
fn resume( state: ResumeClassifierState<'a, I, Q, N>, opening: BracketType ) -> (Option<Self::Block>, Self)
Resume classification from a state retrieved by a previous
DepthIterator::stop
or StructuralIterator::stop
invocation.
sourcefn stop(self, block: Option<Self::Block>) -> ResumeClassifierState<'a, I, Q, N>
fn stop(self, block: Option<Self::Block>) -> ResumeClassifierState<'a, I, Q, N>
Stop classification and return a state object that can be used to resume a classifier from the place in which the current one was stopped.