Skip to content

Glossary: Data Structures and Algorithms in Rust

Generic

Also written: generics, generic type

Code written for any type T, such as Stack<T>, so the same code can make a Stack<String> or a Stack<char>.

Where the book teaches it

Related terms

StructMethod