pub struct ResumeClassifierState<'a, I: QuoteClassifiedIterator<'a>> {
    pub iter: I,
    pub block: Option<ResumeClassifierBlockState<'a>>,
    pub are_commas_on: bool,
    pub are_colons_on: bool,
}
Expand description

State allowing resumption of a classifier from a particular place in the input along with the stopped QuoteClassifiedIterator.

Fields§

§iter: I

The stopped iterator.

§block: Option<ResumeClassifierBlockState<'a>>

The block at which classification was stopped.

§are_commas_on: bool

Was comma classification turned on when the classification was stopped.

§are_colons_on: bool

Was colon classification turned on when the classification was stopped.

Implementations§

source§

impl<'a, I: QuoteClassifiedIterator<'a>> ResumeClassifierState<'a, I>

source

pub fn get_idx(&self) -> usize

Get the index in the original bytes input at which classification has stopped.

source

pub fn offset_bytes(&mut self, count: isize)

Move the state forward by count bytes.

Panics

If the count is not positive.

Auto Trait Implementations§

§

impl<'a, I> RefUnwindSafe for ResumeClassifierState<'a, I>where I: RefUnwindSafe,

§

impl<'a, I> Send for ResumeClassifierState<'a, I>where I: Send,

§

impl<'a, I> Sync for ResumeClassifierState<'a, I>where I: Sync,

§

impl<'a, I> Unpin for ResumeClassifierState<'a, I>where I: Unpin,

§

impl<'a, I> UnwindSafe for ResumeClassifierState<'a, I>where I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.