pub struct SourceInput<'a> { /* private fields */ }Expand description
Zero-copy input reader with CR/LF normalization and source location tracking.
Implementations§
Source§impl<'a> SourceInput<'a>
impl<'a> SourceInput<'a>
pub fn new(input: &'a str) -> Self
pub fn location(&self) -> SourceLocation
pub fn pos(&self) -> usize
pub fn is_eof(&self) -> bool
pub fn current_char(&self) -> Option<char>
pub fn peek_char(&self, n: usize) -> Option<char>
pub fn next_char(&mut self) -> Option<char>
pub fn reconsume(&mut self)
pub fn slice(&self, start: usize, end: usize) -> &'a str
pub fn slice_from(&self, start: usize) -> &'a str
pub fn starts_with_ignore_case(&self, pattern: &str) -> bool
Auto Trait Implementations§
impl<'a> Freeze for SourceInput<'a>
impl<'a> RefUnwindSafe for SourceInput<'a>
impl<'a> Send for SourceInput<'a>
impl<'a> Sync for SourceInput<'a>
impl<'a> Unpin for SourceInput<'a>
impl<'a> UnsafeUnpin for SourceInput<'a>
impl<'a> UnwindSafe for SourceInput<'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