Struct nom::MemProducer [] [src]

pub struct MemProducer<'x> {
    // some fields omitted
}

A MemProducer generates values from an in memory byte buffer

it generates data by chunks, and keeps track of how much was consumed. It can receive messages of type Move to handle consumption and seeking

Methods

impl<'x> MemProducer<'x>

fn new(buffer: &'x [u8], chunk_size: usize) -> MemProducer

Trait Implementations

impl<'x, 'b> Producer<'b, &'x [u8], Move> for MemProducer<'x>

fn apply<'a, O, E>(&'b 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>