Module stack

Source
Available on crate feature stack only.
Expand description

Stack management utilities.

Structs§

RecursionGuard
Tracks recursion depth.
RecursionLimitError
A RecursionGuard’s recursion limit was reached.

Constants§

STACK_RED_ZONE
The red zone is the amount of stack space that must be available on the current stack in order for maybe_grow to call the supplied closure without allocating a new stack.
STACK_SIZE
The size of any freshly allocated stacks. It was chosen to match the default stack size for threads in Rust.

Traits§

CheckedRecursion
A trait for types which support bounded recursion to prevent stack overflow.

Functions§

maybe_grow
Grows the stack if necessary before invoking f.