Skip to main content

qubit_function/tasks/
mod.rs

1/*******************************************************************************
2 *
3 *    Copyright (c) 2025 - 2026.
4 *    Haixing Hu, Qubit Co. Ltd.
5 *
6 *    All rights reserved.
7 *
8 ******************************************************************************/
9//! # Task Function Module
10//!
11//! Provides zero-argument task-oriented functional abstractions.
12//!
13//! `Callable` represents a one-time computation that returns
14//! `Result<R, E>`. `Runnable` represents a one-time action that returns
15//! `Result<(), E>`. Both abstractions are intentionally fallible and consume
16//! `self`, making them suitable for deferred work, workflows, retry steps,
17//! cleanup hooks, and executor task submission.
18//!
19//! # Author
20//!
21//! Haixing Hu
22
23pub mod callable;
24pub mod runnable;
25
26pub use callable::{
27    BoxCallable,
28    Callable,
29};
30pub use runnable::{
31    BoxRunnable,
32    Runnable,
33};