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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Blueprint SDK Job Router
//!
//! This crate provides the [`Router`], which is used to route jobs to different handlers based on their [`JobId`].
//!
//! # Usage
//!
//! ```rust
//! use blueprint_sdk::Router;
//! use blueprint_sdk::job::JobWithoutContextExt;
//! use blueprint_sdk::{IntoJobResult, JobResult};
//!
//! // Define a job function. See [`Job`] for more details
//! async fn my_job() -> String {
//! String::from("Hello world!")
//! }
//!
//! // Give the job some kind of ID. Many types can be converted
//! // into a [`JobId`]. See [`JobId`] for more details
//! const MY_JOB_ID: u32 = 0;
//!
//! let router = Router::new().route(MY_JOB_ID, my_job);
//!
//! # let _: Router = router;
//! ```
//!
//! # See also
//!
//! - [`Job`](https://docs.rs/blueprint_sdk/latest/blueprint_sdk/trait.Job.html)
//! - [`JobId`]
//!
//! [`JobId`]: https://docs.rs/blueprint_sdk/latest/blueprint_sdk/struct.JobId.html
//!
//! ## Features
extern crate alloc;
pub
pub use *;