Skip to main content

Module runnable_with

Module runnable_with 

Source
Expand description

§RunnableWith Types

Provides fallible, reusable actions that operate on a mutable input.

A RunnableWith<T, E> is equivalent to FnMut(&mut T) -> Result<(), E>, but uses task-oriented vocabulary. Use it when the operation needs access to protected or caller-provided state 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§

ArcRunnableWith
Thread-safe shared runnable with mutable input.
BoxRunnableWith
Box-based runnable with mutable input.
RcRunnableWith
Single-threaded shared runnable with mutable input.

Traits§

RunnableWith
A fallible, reusable action that receives mutable input.