/// ZipStack: a tiny example utility
////// Adds items to a stack and zips them into a Vec
pubstructZipStack<T>{items:Vec<T>,
}impl<T>ZipStack<T>{/// Create a new ZipStack
pubfnnew()->Self{Self{ items:Vec::new()}}/// Push an item
pubfnpush(&mutself, item: T){self.items.push(item);}/// Consume and return all items
pubfninto_vec(self)->Vec<T>{self.items
}}