Back to Developer Roadmap

Boolean

src/data/roadmaps/rust/content/[email protected]

4.0632 B
Original Source

Boolean

Rust's bool primitive type represents truth values with two possible states: true or false. Booleans are used in conditional statements and logical operations like && (AND), || (OR), and ! (NOT). When cast to integers, true becomes 1 and false becomes 0. Example: let is_active: bool = true;

Visit the following resources to learn more: