Skip to main content

Module runnable_once

Module runnable_once 

Source
Expand description

§Runnable Once Types

Provides fallible, one-time, zero-argument actions.

A RunnableOnce<E> is equivalent to FnOnce() -> Result<(), E>, but uses task-oriented vocabulary. Use it when the operation’s side effect matters and only success or failure should be reported.

The trait itself does not require Send; concurrent executors should add + Send + 'static at their API boundary.

§Author

Haixing Hu

Structs§

BoxRunnableOnce
Box-based one-time runnable.

Traits§

RunnableOnce
A fallible one-time action.