pub trait DfirRunnable {
// Required method
fn run_available_sync(&mut self);
}Available on crate feature
embedded_runtime only.Expand description
Object-safe trait for running a DFIR flow synchronously.
Generated embedded functions return Dfir<impl TickClosure + 'a>, whose type parameter
cannot be named by the caller. Boxing the graph as Box<dyn DfirRunnable> erases that
type with a single virtual call per run_available_sync
invocation. (This is cheaper than Dfir::into_erased, which boxes a future on every
tick, and also works for tick closures that only implement TickClosure.)
Required Methods§
Sourcefn run_available_sync(&mut self)
fn run_available_sync(&mut self)
Runs ticks as long as work is available, then returns.
See Dfir::run_available_sync; panics if a tick yields asynchronously.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".