MCPcopy Create free account
hub / github.com/alexfertel/rust-algorithms / Stack

Class Stack

src/data_structures/stack.rs:2–4  ·  view source on GitHub ↗

a vector-based implementation of the stack data type

Source from the content-addressed store, hash-verified

1// a vector-based implementation of the stack data type
2pub struct Stack<T> {
3 vec: Vec<T>,
4}
5
6impl<T> Stack<T> {
7 // a constructor that returns an instance of Stack<T> backed by an empty Vec<T>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected