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>
[src]

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

Trait Implementations

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

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