std::bool
Import with import std::bool.
Exports
Section titled “Exports”type True
Section titled “type True”type True
Singleton type representing the boolean true value; a variant of Bool.
True.inspect
Section titled “True.inspect”impl Debug for True
fn inspect(value: True) -> String
impl Debug.inspect
True.compare
Section titled “True.compare”impl Comparable for True
fn compare(a: True, b: True) -> Ordering
impl Comparable.compare
True.to_string
Section titled “True.to_string”impl Display for True
fn to_string(value: True) -> String
impl Display.to_string
True.equal
Section titled “True.equal”impl Equatable for True
fn equal(a: True, b: True) -> Bool
impl Equatable.equal
True.hash
Section titled “True.hash”impl Hashable for True
fn hash(value: True) -> Int
impl Hashable.hash
type False
Section titled “type False”type False
Singleton type representing the boolean false value; a variant of Bool.
False.inspect
Section titled “False.inspect”impl Debug for False
fn inspect(value: False) -> String
impl Debug.inspect
False.compare
Section titled “False.compare”impl Comparable for False
fn compare(a: False, b: False) -> Ordering
impl Comparable.compare
False.to_string
Section titled “False.to_string”impl Display for False
fn to_string(value: False) -> String
impl Display.to_string
False.equal
Section titled “False.equal”impl Equatable for False
fn equal(a: False, b: False) -> Bool
impl Equatable.equal
False.hash
Section titled “False.hash”impl Hashable for False
fn hash(value: False) -> Int
impl Hashable.hash
enum Bool
Section titled “enum Bool”enum Bool embeds False embeds True end
Boolean enum with True and False variants.
assert True == True
refute True == False
Bool.inspect
Section titled “Bool.inspect”impl Debug for Bool
fn inspect(b: Bool) -> String
impl Debug.inspect
True or False, the same text as Display: a Bool’s literal is
its user-facing form.
assert Debug.inspect(True) == "True"
assert Debug.inspect(False) == Display.to_string(False)
Bool.compare
Section titled “Bool.compare”impl Comparable for Bool
fn compare(a: Bool, b: Bool) -> Ordering
impl Comparable.compare
Bool.to_string
Section titled “Bool.to_string”impl Display for Bool
fn to_string(value: Bool) -> String
impl Display.to_string
Bool.equal
Section titled “Bool.equal”impl Equatable for Bool
fn equal(a: Bool, b: Bool) -> Bool
impl Equatable.equal
Bool.hash
Section titled “Bool.hash”impl Hashable for Bool
fn hash(value: Bool) -> Int
impl Hashable.hash