Expand description
Runtime execution context stack
The “stack” traces the state of execution context at runtime.
For example, when entering a subshell, the runner pushes Frame::Subshell
to the stack. By examining the stack, commands executed in the subshell can
detect that they are inside the subshell.
This module provides guards to ensure stack frames are pushed and popped
correctly. The push function returns a guard that will pop the frame when
dropped. Implementing Deref and DerefMut, the guard allows access to the
borrowed stack or environment.
Stack::push returns a StackFrameGuard that allows re-borrowing the
Stack. Env::push_frame returns a EnvFrameGuard that implements
DerefMut<Target = Env>.
Structs§
- Builtin
- Information about the currently executing built-in
- EnvFrame
Guard - RAII-style guard that makes sure a stack frame is popped properly
- Stack
- Runtime execution context stack
- Stack
Frame Guard - RAII-style guard that makes sure a stack frame is popped properly
Enums§
- Frame
- Element of runtime execution context stack