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
//! A stack-reusing trampoline runtime.
//!
//! The runtime repeatedly evaluates [`crate::trampoline::Action`] values until a terminal
//! [`crate::trampoline::Action::Done`] is reached.
//! [`crate::trampoline::Action::Call`] stores the next step as a [`crate::thunk::Thunk`],
//! allowing each recursive step to reuse the same outer stack frame instead of recursing through
//! Rust's native call stack.
use crateThunk;
/// The next step to be executed by the trampoline runtime.
/// Produces a completed [`Action`].
pub const
/// Produces a pending [`Action`] from a `FnOnce`.
///
/// The closure is executed later by [`run`].
pub const
/// Runs trampoline actions until they resolve to a final value.