1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Task descriptor and registry for handler dispatch.
//!
//! ## Entry points
//!
//! - [`TaskDescriptor`] — static metadata and default policies for one task (**Creating tasks**)
//! - [`TaskDefaults`] — grouped retry/rate/priority defaults for descriptors
//! - [`TaskRegistry`] — lookup tasks by name and invoke handlers
//!
//! ## Boot-time registration
//!
//! With [`BosonBuilder::auto_registry`](crate::BosonBuilder::auto_registry), tasks defined with
//! the [`boson_macros::task`] attribute are discovered at link time via [Quark](https://github.com/unified-field-dev/quark)
//! inventory.
//!
//! **Link closure:** the binary that boots Boson must depend on every crate that defines tasks.
//! See the [`boson`](https://docs.rs/boson) crate **Integrating the server** section.
//!
//! ## Manual registration (tests and advanced)
//!
//! [`TaskRegistry::register`] uses the same dispatch path as auto-discovery and is common in unit
//! tests. See [`TaskDescriptor`] for policy fields and signature versioning.
//!
//! ```rust,no_run
//! use boson_runtime::{InvokeFn, TaskDescriptor, TaskDefaults, TaskRegistry};
//!
//! fn register_example(registry: &mut TaskRegistry, invoke: InvokeFn) {
//! let desc: &'static TaskDescriptor = Box::leak(Box::new(TaskDescriptor::with_defaults(
//! "example",
//! invoke,
//! "{}",
//! 0,
//! TaskDefaults::standard(),
//! )));
//! registry.register(desc);
//! }
//! ```
pub use ;
pub use TaskRegistry;