Dynstack
A stack for rust trait objects that minimizes allocations
Install / Use
/learn @archshift/DynstackREADME
dynstack
A stack for trait objects that minimizes allocations
COMPATIBILITY NOTE: dynstack relies on an underspecified fat pointer representation. Though
it isn't expected to change in the foreseeable future, this crate expects Rust 1.34's representation.
Usage
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]
Related Skills
himalaya
345.4kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
coding-agent
345.4kDelegate coding tasks to Codex, Claude Code, or Pi agents via background process
