Skip to main content

Module callable

Module callable 

Source
Expand description

§Callable Types

Provides fallible, reusable, zero-argument computations.

A Callable<R, E> is equivalent to FnMut() -> Result<R, E>, but uses task-oriented vocabulary. Use it when the operation is a computation or task whose success value matters. Use Runnable<E> when the operation only needs to report success or failure.

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

§Author

Haixing Hu

Structs§

ArcCallable
Thread-safe callable.
BoxCallable
Box-based callable.
RcCallable
Single-threaded shared callable.

Traits§

Callable
A fallible, reusable zero-argument computation.