Skip to content

Glossary: Rust Basics

bool

Also written: boolean

A type with only two values, `true` and `false`. Comparisons such as `stock < 20` produce a `bool`, and `if` conditions must be one.

Where the book teaches it

Related terms

Condition