pub trait BackendStreamingTask<Bkend>: Send + Any {
type Output: Send;
type MetadataType: PartialEq;
// Required method
fn into_stream(
self,
backend: &Bkend,
) -> impl Stream<Item = Self::Output> + Send + Unpin + 'static;
// Provided method
fn metadata() -> Vec<Self::MetadataType> { ... }
}Expand description
A task of kind T that can be run on a backend, returning a stream of outputs Output. The type must implement Any, as the TypeId is used as part of the task management process.
Required Associated Types§
Required Methods§
fn into_stream( self, backend: &Bkend, ) -> impl Stream<Item = Self::Output> + Send + Unpin + 'static
Provided Methods§
Sourcefn metadata() -> Vec<Self::MetadataType>
fn metadata() -> Vec<Self::MetadataType>
Metadata provides a way of grouping different tasks for use in constraints, if you override the default implementation.
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.