Skip to main content

ProcessorSupplier

Trait ProcessorSupplier 

Source
pub trait ProcessorSupplier<KIn, VIn, KOut, VOut>:
    Send
    + Sync
    + 'static {
    // Required method
    fn get(&self) -> Box<dyn Processor<KIn, VIn, KOut, VOut>>;
}
Expand description

Factory for Processor instances. It makes one instance per task, which gives per-task isolation.

Required Methods§

Source

fn get(&self) -> Box<dyn Processor<KIn, VIn, KOut, VOut>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F, P, KIn, VIn, KOut, VOut> ProcessorSupplier<KIn, VIn, KOut, VOut> for F
where F: Fn() -> P + Send + Sync + 'static, KIn: Send, VIn: Send, KOut: Send, VOut: Send, P: Processor<KIn, VIn, KOut, VOut>,