Skip to main content

Module callable_with

Module callable_with 

Source
Expand description

§CallableWith Types

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

A CallableWith<T, R, E> is equivalent to FnMut(&mut T) -> Result<R, E>, but uses task-oriented vocabulary. Use it when the operation needs access to protected or caller-provided state and returns a success value.

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

§Author

Haixing Hu

Structs§

ArcCallableWith
Thread-safe shared callable with mutable input.
BoxCallableWith
Box-based callable with mutable input.
RcCallableWith
Single-threaded shared callable with mutable input.

Traits§

CallableWith
A fallible, reusable computation that receives mutable input.