Trait vector::transforms::TaskTransform
source · pub trait TaskTransform<T>: Send + 'staticwhere
T: EventContainer + 'static,{
// Required method
fn transform(
self: Box<Self>,
task: Pin<Box<dyn Stream<Item = T> + Send>>,
) -> Pin<Box<dyn Stream<Item = T> + Send>>;
// Provided method
fn transform_events(
self: Box<Self>,
task: Pin<Box<dyn Stream<Item = Event> + Send>>,
) -> Pin<Box<dyn Stream<Item = Event> + Send>>
where T: From<Event>,
<T as EventContainer>::IntoIter: Send { ... }
}
Expand description
Transforms that tend to be more complicated runtime style components.
These require coordination and map a stream of some T
to some U
.
§Invariants
- It is an illegal invariant to implement
FunctionTransform
for aTaskTransform
or vice versa.