Crate scoped_stack

source ·

Structs

  • A scoped stack is a stack of hashmaps that allows you to push and pop scopes. When you push a scope, a new hashmap is created and pushed onto the stack. When you pop a scope, the top hashmap is popped off the stack. When you insert a value, it is inserted into the top hashmap. When you get a value, it is searched for in the top hashmap, and if it is not found, it is searched for in the next hashmap down the stack. When you remove a value, it is removed from the top hashmap, and if it is not found, it is removed from the next hashmap down the stack.