Skip to content

Glossary: Software Design Patterns in Rust

const

Also written: constant, associated constant

A named value fixed at compile time, such as `const FREE_SHIPPING_AT: f64 = 75.0;`. It is the fix for magic numbers.

Where the book teaches it

Related terms

Magic number