Expand description
dynstack
can mostly replace anywhere you’d use a stack, or a vector that doesn’t
require removal from its center.
let mut stack = DynStack::<dyn Debug>::new();
dyn_push!(stack, "hello, world!");
dyn_push!(stack, 0usize);
dyn_push!(stack, [1, 2, 3, 4, 5, 6]);
for item in stack.iter() {
println!("{:?}", item);
}
// prints:
// "hello, world!"
// 0
// [1, 2, 3, 4, 5, 6]
Macros§
- dyn_
push - Push an item onto the back of the specified stack
Structs§
- DynStack
- DynStack
Iter - Iterator over trait object references
- DynStack
Iter Mut - Iterator over mutable trait object references