Skip to content

Glossary: Rust Basics

Constant

Also written: const, constants

A name for a value that never changes anywhere in the program, written with `const` outside `main`, in UPPERCASE, with its type, like `const SHIPPING_CENTS: u32 = 1200;`.

Where the book teaches it

Related terms

VariableType annotation