Module stack_frame_allocator

Source
Expand description

The StackFrameAllocator allows the creation of “Frames” where values can be pushed onto this frame. Frames only exist in the scope they’re created in using the new_frame function. At the end of a frame’s scope, the entire frame is popped, and the StackFrameAllocator will continue pushing items onto the previous frame. Because only one StackRef can exist at a time for a given value, both [get] and [get_mut] functions are safe, due to being able to be validated by the borrow checker at compile time.

Structs§

StackFrameAllocator
The StackFrameAllocator allows the creation of “Frames” where key value pairs can be pushed onto this frame. Frames only exist in the scope they’re created in using the new_frame function. At the end of a frame’s scope, the entire frame is popped, and the StackFrameAllocator will continue pushing items onto the previous frame. Because only one StackRef can exist at a time for a given value, both [get] and [get_mut] functions are safe, due to being able to be validated by the borrow checker at compile time.