Primitive bool
Expand
true or false
Also: #bool Type Generic
Implementations
impl bool
pub unsafe fn as_clock(self) -> clock
Casts a bool to a clock signal by reinterpreting its bit.
This function must be used with caution. Using clock signals as part of logic expressions may lead to unexpected issues depending on the target.
pub fn as_uint(self) -> uint<1>
Casts a bool to an unsigned 1-bit integer by reinterpreting its bits.
Examples
assert false.as_uint() == 0u1;
assert true.as_uint() == 1u1;pub unsafe fn to_clock(self) -> clock
Casts a bool to a clock signal by reinterpreting its bit.
This function must be used with caution. Using clock signals as part of logic expressions may lead to unexpected issues depending on the target.
pub fn to_uint(self) -> uint<1>
Casts a bool to an unsigned 1-bit integer by reinterpreting its bits.
Examples
assert false.as_uint() == 0u1;
assert true.as_uint() == 1u1;Trait Implementations
impl Not for bool
fn not(self) -> Self
impl And for bool
fn and(self, rhs: Self) -> Self
impl Or for bool
fn or(self, rhs: Self) -> Self
impl Xor for bool
fn xor(self, rhs: Self) -> Self