Expand description
§Task Function Module
Provides zero-argument task-oriented functional abstractions.
Callable represents a reusable computation that returns Result<R, E>.
Runnable represents a reusable action that returns Result<(), E>. Both
abstractions are intentionally fallible and support task submission in
executor-style workflows.
CallableWith and RunnableWith are their mutable-input counterparts for
executor APIs that pass protected state into the task.
One-time equivalents are also provided as CallableOnce and RunnableOnce
for move-only callable use cases.
§Author
Haixing Hu
Re-exports§
pub use callable::ArcCallable;pub use callable::BoxCallable;pub use callable::Callable;pub use callable::RcCallable;pub use callable_once::BoxCallableOnce;pub use callable_once::CallableOnce;pub use callable_with::ArcCallableWith;pub use callable_with::BoxCallableWith;pub use callable_with::CallableWith;pub use callable_with::RcCallableWith;pub use runnable::ArcRunnable;pub use runnable::BoxRunnable;pub use runnable::RcRunnable;pub use runnable::Runnable;pub use runnable_once::BoxRunnableOnce;pub use runnable_once::RunnableOnce;pub use runnable_with::ArcRunnableWith;pub use runnable_with::BoxRunnableWith;pub use runnable_with::RcRunnableWith;pub use runnable_with::RunnableWith;
Modules§
- callable
- Callable Types
- callable_
once - Callable Once Types
- callable_
with - CallableWith Types
- runnable
- Runnable Types
- runnable_
once - Runnable Once Types
- runnable_
with - RunnableWith Types