Skip to main content

RunSink

Trait RunSink 

Source
pub trait RunSink {
    // Required method
    fn commit(&mut self, outcome: RunOutcome) -> Result<()>;

    // Provided method
    fn finished(&mut self, _outcome: &RunOutcome) { ... }
}
Expand description

Receiver of the outcomes of a batch.

Required Methods§

Source

fn commit(&mut self, outcome: RunOutcome) -> Result<()>

Receives a finished run. Runs arrive on the calling thread in request order.

§Errors

Returns the error that stopped the sink. The batch ends with it, and the executor aborts its control.

Provided Methods§

Source

fn finished(&mut self, _outcome: &RunOutcome)

Sees a run as it finishes, before Self::commit receives it. Runs arrive on the calling thread in the order they finish.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§