Struct nom::FileProducer
[−]
[src]
pub struct FileProducer { // some fields omitted }
Methods
impl FileProducer
[src]
fn new(filename: &str, buffer_size: usize) -> Result<FileProducer>
fn state(&self) -> FileProducerState
fn refill(&mut self) -> Option<usize>
fn resize(&mut self, s: usize) -> usize
Resize the internal buffer, copy the data to the new one and returned how much data was copied
If the new buffer is smaller, the prefix will be copied, and the rest of the data will be dropped
Trait Implementations
impl Debug for FileProducer
[src]
impl<'x> Producer<'x, &'x [u8], Move> for FileProducer
[src]
fn apply<'a, O, E>(&'x mut self, consumer: &'a mut Consumer<&'x [u8], O, E, Move>) -> &'a ConsumerState<O, E, Move>
Applies a consumer once on the produced data, and return the consumer's state Read more
fn run<'a: 'b, O, E: 'b>(&'b mut self, consumer: &'a mut Consumer<I, O, E, M>) -> Option<&O>
Applies a consumer once on the produced data, and returns the generated value if there is one