Trait nom::Consumer [] [src]

pub trait Consumer {
    fn consume(&mut self, input: &[u8]) -> ConsumerState;
    fn failed(&mut self, error_code: u32);
    fn end(&mut self);

    fn run(&mut self, producer: &mut Producer) { ... }
}

Implement the consume method, taking a byte array as input and returning a consumer state

The run function takes care of continuing or not

Required Methods

fn consume(&mut self, input: &[u8]) -> ConsumerState

fn failed(&mut self, error_code: u32)

fn end(&mut self)

Provided Methods

fn run(&mut self, producer: &mut Producer)

Implementors