Struct nom::FileProducer [] [src]

pub struct FileProducer {
    // some fields omitted
}

Methods

impl FileProducer

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<'x> Producer<'x, &'x [u8], Move> for FileProducer

fn apply<'a, O, E>(&'x mut self, consumer: &'a mut Consumer<&'x [u8], O, E, Move>) -> &'a ConsumerState<O, E, Move>

fn run<'a, O, E: 'b>(&'b mut self, consumer: &'a mut Consumer<I, O, E, M>) -> Option<&O>

Derived Implementations

impl Debug for FileProducer

fn fmt(&self, __arg_0: &mut Formatter) -> Result