mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-10-25 17:42:27 +08:00
* refactor: clean to roadmap content * refactor: move shared helpers into scripts/lib
9 lines
632 B
Markdown
9 lines
632 B
Markdown
# 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:
|
|
|
|
- [@official@bool](https://doc.rust-lang.org/std/primitive.bool.html)
|
|
- [@article@The Boolean Type](https://rust-book.cs.brown.edu/ch03-02-data-types.html#the-boolean-type)
|
|
- [@video@Rust Tutorial - Booleans](https://www.youtube.com/watch?v=t047Hseyj_k&t=388s) |