Source

Trait Source 

Source
pub trait Source<T: PipelineIO>: Data {
    // Required methods
    fn on_next<'life0, 'async_trait>(
        &'life0 self,
        data: T,
        __arg2: Token,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_edge(&self, edge: Edge<T>, _: Token) -> Result<(), PipelineError>;

    // Provided method
    fn link<S: Sink<T> + 'static>(
        &self,
        sink: Arc<S>,
    ) -> Result<Arc<S>, PipelineError> { ... }
}
Expand description

A Source trait defines how data is emitted from a source to a downstream sink.

Required Methods§

Source

fn on_next<'life0, 'async_trait>( &'life0 self, data: T, __arg2: Token, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn set_edge(&self, edge: Edge<T>, _: Token) -> Result<(), PipelineError>

Provided Methods§

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<In: PipelineIO, Out: PipelineIO> Source<In> for SegmentSource<In, Out>

Source§

impl<In: PipelineIO, Out: PipelineIO> Source<In> for ServiceFrontend<In, Out>

Source§

impl<In: PipelineIO, Out: PipelineIO> Source<Out> for PipelineNode<In, Out>

Source§

impl<Req: PipelineIO, Resp: PipelineIO> Source<Resp> for SegmentSink<Req, Resp>

Source§

impl<Req: PipelineIO, Resp: PipelineIO> Source<Resp> for ServiceBackend<Req, Resp>