PipelineLayer

Trait PipelineLayer 

Source
pub trait PipelineLayer<T: Sync + Send + 'static> {
    // Required methods
    fn to<R: Sync + Send + 'static, C>(self, c: C) -> impl PipelineLayer<R>
       where C: Fn(T) -> Result<R, Box<dyn Error>> + Sync + Send + 'static;
    fn map_to<R: Sync + Send + 'static, C>(self, c: C) -> impl PipelineLayer<R>
       where C: Fn(T) -> Vec<R> + Sync + Send + 'static;
    fn finish<C>(self, c: C) -> Vec<JoinHandle<()>>
       where C: FnMut(T) -> Result<(), Box<dyn Error>> + Send + 'static;
}

Required Methods§

Source

fn to<R: Sync + Send + 'static, C>(self, c: C) -> impl PipelineLayer<R>
where C: Fn(T) -> Result<R, Box<dyn Error>> + Sync + Send + 'static,

Source

fn map_to<R: Sync + Send + 'static, C>(self, c: C) -> impl PipelineLayer<R>
where C: Fn(T) -> Vec<R> + Sync + Send + 'static,

Source

fn finish<C>(self, c: C) -> Vec<JoinHandle<()>>
where C: FnMut(T) -> Result<(), Box<dyn Error>> + Send + 'static,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> PipelineLayer<T> for Subscriber<T>
where T: TryFrom<Message> + Send + Sync + 'static, T::Error: Error + 'static,

Source§

impl<T: Sync + Send + 'static> PipelineLayer<T> for PipelineBuilder<T>