[−][src]Struct moore::lexer::AccumulatingReader
Implementations
impl AccumulatingReader
[src]
pub fn new(rd: Box<dyn Read + 'static, Global>) -> AccumulatingReader
[src]
pub fn refill(&mut self, min_len: usize)
[src]
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.
pub fn slice(&self) -> &[u8]
[src]
Return a slice of the consumed bytes.
pub fn rem_slice(&self) -> &[u8]
[src]
Return a slice of the remaining bytes, starting at the last call to clear().
Trait Implementations
impl Reader for AccumulatingReader
[src]
pub fn peek(&mut self, off: usize) -> Option<char>
[src]
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.
pub fn consume(&mut self, amt: usize)
[src]
Consume the next amt
bytes of the input. All consumed bytes since the
last clear()
can be accessed via slice()
or to_string()
.
pub fn clear(&mut self)
[src]
Clear the consumed bytes.
pub fn to_string(&self) -> String
[src]
Convert the consumed bytes to a String.
Auto Trait Implementations
impl !RefUnwindSafe for AccumulatingReader
[src]
impl !Send for AccumulatingReader
[src]
impl !Sync for AccumulatingReader
[src]
impl Unpin for AccumulatingReader
[src]
impl !UnwindSafe for AccumulatingReader
[src]
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,
pub 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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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.
pub 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>,