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 methods
fn link<S: Sink<T> + 'static>(
&self,
sink: Arc<S>,
) -> Result<Arc<S>, PipelineError> { ... }
fn link_terminal<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§
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 Methods§
fn link<S: Sink<T> + 'static>( &self, sink: Arc<S>, ) -> Result<Arc<S>, PipelineError>
Sourcefn link_terminal<S: Sink<T> + 'static>(
&self,
sink: Arc<S>,
) -> Result<Arc<S>, PipelineError>
fn link_terminal<S: Sink<T> + 'static>( &self, sink: Arc<S>, ) -> Result<Arc<S>, PipelineError>
Close a pipeline response path without creating an ownership cycle.
The returned sink is the pipeline’s ownership root and must be retained by the caller.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".