[−][src]Struct jsonc_parser::Scanner
Converts text into a stream of tokens.
Methods
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
impl !RefUnwindSafe for Scanner
impl !Send for Scanner
impl !Sync for Scanner
impl Unpin for Scanner
impl UnwindSafe for Scanner
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,