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
//! # async-reify
//!
//! Instrument async functions to extract their continuation structure
//! as an inspectable, serializable step graph.
//!
//! The core workflow:
//! 1. Wrap futures in [`TracedFuture`] to record [`PollEvent`]s
//! 2. Use [`LabeledFuture`] to attach source labels to await points
//! 3. Extract an [`AsyncStepGraph`] from the collected trace
//! 4. Optionally serialize to JSON or render as Graphviz DOT
//!
//! # Examples
//!
//! ```
//! use async_reify::{TracedFuture, PollResult};
//!
//! # tokio_test::block_on(async {
//! let (result, trace) = TracedFuture::run(async { 42 }).await;
//! assert_eq!(result, 42);
//! assert!(!trace.events.is_empty());
//! assert!(matches!(trace.events.last().unwrap().result, PollResult::Ready));
//! # });
//! ```
pub use ;
pub use LabeledFuture;
pub use ;
/// Attribute proc macro that rewrites every `.await` in an async function
/// body into a [`LabeledFuture`] recording into a shared [`Trace`].
///
/// Re-exported from `async-reify-macros` when the `macros` feature is
/// enabled.
pub use trace_async;