Skip to content

Glossary: Rust Beyond the Basics

generic

Also written: generics, generic function, generic struct

Code written once with a type parameter so it works for many types, such as `cheapest` for `u32`, `f64` and `&str`.

Where the book teaches it

Related terms

type parametertrait boundmonomorphization