Skip to main content

Emit

Trait Emit 

Source
pub trait Emit {
    type Item;

    // Required method
    fn emit(&mut self, item: Self::Item) -> Result<(), EmitError>;
}
Expand description

Object-safe handle to push items downstream from inside crate::Stage::process.

Required Associated Types§

Source

type Item

The type of item this handle accepts.

Required Methods§

Source

fn emit(&mut self, item: Self::Item) -> Result<(), EmitError>

Push one item downstream.

§Errors

Returns EmitError::Closed when the downstream has shut down (often because a later stage produced an error and the driver is unwinding). Returns EmitError::WouldBlock under a non-blocking driver if the downstream buffer is full.

Implementors§