Trait StreamPipelineFactory

Source
pub trait StreamPipelineFactory:
    Send
    + Sync
    + 'static {
    type Item;

    // Required method
    fn generate(&self) -> Result<Self::Item>;

    // Provided method
    fn setup<'async_trait>(    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: Sized + 'async_trait { ... }
}
Expand description

StreamPipelineFactory is aim at generating specified StreamPipeline. It’s designed for user-defined, which means you can customize your own StreamPipeline as an entrance.

Required Associated Types§

Required Methods§

Source

fn generate(&self) -> Result<Self::Item>

generate will generate a new StreamPipeline.

Provided Methods§

Source

fn setup<'async_trait>() -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,

setup will be called which a StreamPipelineFactory being registered, and notice it’s a oneshot behavior.

Implementors§