Struct parsy::ParserInput
source · pub struct ParserInput<'a> { /* private fields */ }
Implementations§
source§impl<'a> ParserInput<'a>
impl<'a> ParserInput<'a>
pub fn new(str: &'a str, file_id: FileId) -> Self
pub fn inner(&self) -> &str
pub fn at(&self) -> Location
pub fn range(&self, len: usize) -> CodeRange
pub fn offset(&self) -> usize
pub fn original(&self) -> &'a str
pub fn mirror_from(&mut self, other: &ParserInput<'a>)
pub fn apply<T>(&mut self, from: &Eaten<T>)
pub fn try_eat_char(&mut self) -> Option<Eaten<char>>
pub fn try_eat(&mut self, len: usize) -> Option<Eaten<&str>>
pub fn eat_at_most(&mut self, len: usize) -> Eaten<&str>
pub fn eat_exact(&mut self, len: usize) -> Result<Eaten<&str>, usize>
pub fn extract(&self, range: CodeRange) -> &str
Trait Implementations§
source§impl<'a> Clone for ParserInput<'a>
impl<'a> Clone for ParserInput<'a>
source§fn clone(&self) -> ParserInput<'a>
fn clone(&self) -> ParserInput<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> RefUnwindSafe for ParserInput<'a>
impl<'a> Send for ParserInput<'a>
impl<'a> Sync for ParserInput<'a>
impl<'a> Unpin for ParserInput<'a>
impl<'a> UnwindSafe for ParserInput<'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