Trait Batch

Source
pub trait Batch<R>: Sized {
    // Required method
    fn run(self) -> Option<R>;
}
Expand description

An abstraction over compile-time and runtime batches. Requires batch_ct or batch_rt.

The only thing which can be done with a value of Batch-bounded type is to .run() it.

Useful as a bound on a function return type.

If the batch returned by a function is to be edited later then consider using more precise bounds: BatchCt and BatchRt.

Required Methods§

Source

fn run(self) -> Option<R>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<CPS, Prev, F, R> Batch<R> for CpsBatch<CPS, (Prev, F)>
where CPS: Cps, (Prev, F): RunBatch<CPS::View, Output = R>,

Source§

impl<CPS: Cps> Batch<()> for CpsBatch<CPS, ()>

Source§

impl<CPS: Cps, R> Batch<R> for CpsBatch<CPS, Vec<Box<dyn FnOnce(&mut CPS::View, Option<R>) -> R>>>