[][src]Struct jsonc_parser::Scanner

pub struct Scanner { /* fields omitted */ }

Converts text into a stream of tokens.

Implementations

impl Scanner[src]

pub fn new(text: &str) -> Scanner[src]

Creates a new scanner based on the provided text.

pub fn scan(&mut self) -> Result<Option<Token>, ParseError>[src]

Moves to and returns the next token.

pub fn token_start(&self) -> usize[src]

Gets the start position of the token.

pub fn token_end(&self) -> usize[src]

Gets the end position of the token.

pub fn token_start_line(&self) -> usize[src]

Gets the line the token starts on.

pub fn token_end_line(&self) -> usize[src]

Gets the line the token ends on.

pub fn token(&self) -> Option<Token>[src]

Gets the current token.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.