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 reusable computation that returns `Result<R, E>`.
14//! `Runnable` represents a reusable action that returns `Result<(), E>`. Both
15//! abstractions are intentionally fallible and support task submission in
16//! executor-style workflows.
17//!
18//! One-time equivalents are also provided as `CallableOnce` and `RunnableOnce`
19//! for move-only callable use cases.
20//!
21//! # Author
22//!
23//! Haixing Hu
24
25pub mod callable;
26pub mod callable_once;
27pub mod runnable;
28pub mod runnable_once;
29
30pub use callable::{
31 ArcCallable,
32 BoxCallable,
33 Callable,
34 RcCallable,
35};
36pub use callable_once::{
37 BoxCallableOnce,
38 CallableOnce,
39};
40pub use runnable::{
41 ArcRunnable,
42 BoxRunnable,
43 RcRunnable,
44 Runnable,
45};
46pub use runnable_once::{
47 BoxRunnableOnce,
48 RunnableOnce,
49};