pub trait DepthIterator<'i, I, Q, M, const N: usize>: FallibleIterator<Item = Self::Block, Error = InputError>where
I: InputBlockIterator<'i, N>,{
type Block: DepthBlock<'i>;
// Required methods
fn resume(
state: ResumeClassifierState<'i, I, Q, M, N>,
opening: BracketType,
) -> (Option<Self::Block>, Self);
fn stop(
self,
block: Option<Self::Block>,
) -> ResumeClassifierState<'i, I, Q, M, N>;
}Expand description
Trait for depth iterators, i.e. finite iterators returning depth information about JSON documents.
Required Associated Types§
Sourcetype Block: DepthBlock<'i>
type Block: DepthBlock<'i>
Type of the DepthBlock implementation used by this iterator.
Required Methods§
Sourcefn resume(
state: ResumeClassifierState<'i, I, Q, M, N>,
opening: BracketType,
) -> (Option<Self::Block>, Self)
fn resume( state: ResumeClassifierState<'i, I, Q, M, 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<'i, I, Q, M, N>
fn stop( self, block: Option<Self::Block>, ) -> ResumeClassifierState<'i, I, Q, M, 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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".