Trait lazy_reader::ReaderOps [−][src]
pub trait ReaderOps {}Show methods
fn next_char(
&mut self,
bookmarks: &mut BookmarkManager
) -> Result<char, Error>; fn advance_char(&mut self, bookmarks: &mut BookmarkManager); fn character(&self) -> Char<Error>; fn finished(&self, bookmarks: &BookmarkManager) -> bool; fn empty(&self) -> bool; fn fill(&mut self, bookmarks: &mut BookmarkManager); fn max_possible_rewind_len(&self, bookmarks: &BookmarkManager) -> usize; fn append_result(&mut self, char: char); fn pop_result(&mut self) -> String; fn offset(&self) -> usize; fn result(&self) -> &String; fn result_mut(&mut self) -> &mut String; fn buffer_len(&self) -> usize; fn set_offset(&mut self, off: usize); fn truncate_match(&mut self, len: usize);
Expand description
The behaviour needed by the reader interface.
Required methods
fn next_char(&mut self, bookmarks: &mut BookmarkManager) -> Result<char, Error>
[src]
Expand description
Read the next character from input.
fn advance_char(&mut self, bookmarks: &mut BookmarkManager)
[src]
Expand description
Advance along the input without returning the character.
fn character(&self) -> Char<Error>
[src]
Expand description
Get the current character from the reader.
fn finished(&self, bookmarks: &BookmarkManager) -> bool
[src]
Expand description
Check if the reader has finished reading.
A reader is finished when it has no further input left to read, and when it does not need to rewind to any point.
fn empty(&self) -> bool
[src]
Expand description
Check if the reader is empty.
fn fill(&mut self, bookmarks: &mut BookmarkManager)
[src]
Expand description
Fill the buffer with words from the input.
fn max_possible_rewind_len(&self, bookmarks: &BookmarkManager) -> usize
[src]
Expand description
Get the maximum possible rewind for the reader.
fn append_result(&mut self, char: char)
[src]
Expand description
Append the provided character to the reader’s result.
fn pop_result(&mut self) -> String
[src]
Expand description
Return self.result
and sets the internal result to empty.
fn offset(&self) -> usize
[src]
Expand description
Get the reader’s current offset in the buffer.
fn result(&self) -> &String
[src]
Expand description
Get an immutable reference to the reader’s result.
fn result_mut(&mut self) -> &mut String
[src]
Expand description
Get a mutable reference to the reader’s result.
fn buffer_len(&self) -> usize
[src]
Expand description
Get the current length of the reader’s buffer.
fn set_offset(&mut self, off: usize)
[src]
Expand description
Set the buffer offset to the specified value.
fn truncate_match(&mut self, len: usize)
[src]
Expand description
Truncate the current match to the provided length.
Implementors
impl<D: Decoder, R: Read<Item = D::Word>> ReaderOps for Reader<D, R>
[src]
impl<D: Decoder, R: Read<Item = D::Word>> ReaderOps for Reader<D, R>
[src]