Struct nom::FileProducer
[−]
[src]
pub struct FileProducer { /* fields omitted */ }
Methods
impl FileProducer
[src]
pub fn new(filename: &str, buffer_size: usize) -> Result<FileProducer>
[src]
pub fn state(&self) -> FileProducerState
[src]
pub fn refill(&mut self) -> Option<usize>
[src]
pub fn resize(&mut self, s: usize) -> usize
[src]
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]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
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>
[src]
&'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>
[src]
&'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