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§
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§
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.