Skip to main content

Worker

Trait Worker 

Source
pub trait Worker<C: CbArgs>: Send + 'static {
    // Required method
    fn done(&self, event: Box<IOEvent<C>>);
}
Expand description

A trait for workers that accept IO events.

This allows using either IOWorkers (wrappers around channels) or direct channels (MTx, Tx) or any other sink, or even process inline.

Required Methods§

Source

fn done(&self, event: Box<IOEvent<C>>)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<C, F> Worker<C> for MTx<F>
where F: Flavor<Item = Box<IOEvent<C>>>, C: CbArgs,

Source§

fn done(&self, item: Box<IOEvent<C>>)

Source§

impl<C, F> Worker<C> for Tx<F>
where F: Flavor<Item = Box<IOEvent<C>>>, C: CbArgs,

Source§

fn done(&self, item: Box<IOEvent<C>>)

Implementors§