Trait vector::transforms::TaskTransform

source ·
pub trait TaskTransform<T>: Send + 'static
where 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 a TaskTransform or vice versa.

Required Methods§

source

fn transform( self: Box<Self>, task: Pin<Box<dyn Stream<Item = T> + Send>>, ) -> Pin<Box<dyn Stream<Item = T> + Send>>

Provided Methods§

source

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,

Wrap the transform task to process and emit individual events. This is used to simplify testing task transforms.

Implementors§