[][src]Trait efflux::io::Lifecycle

pub trait Lifecycle {
    fn on_start(&mut self, _ctx: &mut Context) { ... }
fn on_entry(&mut self, _input: &[u8], _ctx: &mut Context) { ... }
fn on_end(&mut self, _ctx: &mut Context) { ... } }

Lifecycle trait to allow hooking into IO streams.

This will be implemented by all stages of MapReduce (e.g. to appropriately handle buffering for the reduction stage). All trait methods default to noop, as they're all optional.

Provided methods

fn on_start(&mut self, _ctx: &mut Context)

Startup hook for the IO stream.

fn on_entry(&mut self, _input: &[u8], _ctx: &mut Context)

Entry hook for the IO stream to handle input values.

fn on_end(&mut self, _ctx: &mut Context)

Finalization hook for the IO stream.

Loading content...

Implementors

Loading content...