Trait rsonpath_lib::classify::StructuralIterator
source · pub trait StructuralIterator<'a, I: QuoteClassifiedIterator<'a>>: Iterator<Item = Structural> + 'a {
fn stop(self) -> ResumeClassifierState<'a, I>;
fn resume(state: ResumeClassifierState<'a, I>) -> Self;
}
Expand description
Trait for classifier iterators, i.e. finite iterators of Structural
characters
that hold a reference to the JSON document valid for 'a
.
Required Methods
sourcefn stop(self) -> ResumeClassifierState<'a, I>
fn stop(self) -> ResumeClassifierState<'a, I>
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.
sourcefn resume(state: ResumeClassifierState<'a, I>) -> Self
fn resume(state: ResumeClassifierState<'a, I>) -> Self
Resume classification from a state retrieved by a previous
StructuralIterator::stop
or DepthIterator::stop
invocation.