Struct moore_common::lexer::AccumulatingReader
source · [−]pub struct AccumulatingReader { /* private fields */ }
Implementations
sourceimpl AccumulatingReader
impl AccumulatingReader
pub fn new(rd: Box<dyn Read>) -> AccumulatingReader
sourcepub fn refill(&mut self, min_len: usize)
pub fn refill(&mut self, min_len: usize)
Grow and fill the internal buffer such that at least min_len characters
are present, or the end of the file has been reached. This function may
shift the buffer contents around, in which case previous buffer indices
become invalid. Recalculate all indices derived from base
, pos
, or
tail
after a call to this function.
Trait Implementations
sourceimpl Reader for AccumulatingReader
impl Reader for AccumulatingReader
sourcefn peek(&mut self, off: usize) -> Option<char>
fn peek(&mut self, off: usize) -> Option<char>
Return the value of the byte that is off
bytes away from the current
position in the input file. If the off
lies beyond the end of file,
None
is returned.
Auto Trait Implementations
impl !RefUnwindSafe for AccumulatingReader
impl !Send for AccumulatingReader
impl !Sync for AccumulatingReader
impl Unpin for AccumulatingReader
impl !UnwindSafe for AccumulatingReader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more