pub struct StageRunner<S, I, O>{ /* private fields */ }Expand description
Runs a single stage as a background task, consuming from input and forwarding results to output.
Implementations§
Source§impl<S, I, O> StageRunner<S, I, O>
impl<S, I, O> StageRunner<S, I, O>
Sourcepub fn new(stage: S) -> Self
pub fn new(stage: S) -> Self
Creates a runner for a single stage with the given channel capacity.
Sourcepub fn run(
self,
input: Receiver<I>,
output: Sender<O>,
) -> JoinHandle<Result<(), StageError>> ⓘwhere
S: 'static,
pub fn run(
self,
input: Receiver<I>,
output: Sender<O>,
) -> JoinHandle<Result<(), StageError>> ⓘwhere
S: 'static,
Consumes items from input, applies the stage, sends to output.
Completes when the input stream ends.
Trait Implementations§
Auto Trait Implementations§
impl<S, I, O> Freeze for StageRunner<S, I, O>
impl<S, I, O> RefUnwindSafe for StageRunner<S, I, O>
impl<S, I, O> Send for StageRunner<S, I, O>
impl<S, I, O> Sync for StageRunner<S, I, O>
impl<S, I, O> Unpin for StageRunner<S, I, O>
impl<S, I, O> UnsafeUnpin for StageRunner<S, I, O>
impl<S, I, O> UnwindSafe for StageRunner<S, I, O>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more