Trait vector_core::transform::TaskTransform
source · pub trait TaskTransform<T: EventContainer + 'static>: Send + '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::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.