Bool
bool
is Move's primitive type for boolean true
and false
values.
Literals
Literals for bool
are either true
or false
.
Operations
Logical
bool
supports three logical operations:
Control Flow
bool
values are used in several of Move's control-flow constructs:
if (bool) { ... }
while (bool) { .. }
assert!(bool, u64)
Ownership
As with the other scalar values built-in to the language, boolean values are implicitly copyable, meaning they can be copied without an explicit instruction such as copy
.