pub struct Parser<'a> { /* private fields */ }Expand description
Parser.
Implementations§
Source§impl<'a> Parser<'a>
impl<'a> Parser<'a>
Sourcepub fn current_position(&self) -> Position
pub fn current_position(&self) -> Position
Returns the current position.
Sourcepub fn remaining_text(&self) -> &str
pub fn remaining_text(&self) -> &str
Returns the remaining, un-parsed text.
Sourcepub fn parsed_items<T: Parse>(&self) -> impl Iterator<Item = (Position, &T)>
pub fn parsed_items<T: Parse>(&self) -> impl Iterator<Item = (Position, &T)>
Returns parsed items of which type is T.
Sourcepub fn into_parse_error(self) -> ParseError
pub fn into_parse_error(self) -> ParseError
Converts Parser into ParseError.
You should call this method only when Parser::parse() returned None.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Parser<'a>
impl<'a> !RefUnwindSafe for Parser<'a>
impl<'a> !Send for Parser<'a>
impl<'a> !Sync for Parser<'a>
impl<'a> Unpin for Parser<'a>
impl<'a> !UnwindSafe for Parser<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more