Primitive std::u8

u8
Expand description
8-bit unsigned integer

Implementations

fn is_zero(self) -> bool

Returns whether a u8 is set to zero.

Returns

  • [bool] -> True if the u8 is zero, otherwise false.

Examples

fn foo() {
    let zero_u8 = u8::zero();
    assert(zero_u8.is_zero());
}

Trait Implementations

fn sqrt(self) -> Self

fn pow(self, exponent: u32) -> Self

fn log(self, base: Self) -> Self

fn log2(self) -> Self

fn try_from(u: u16) -> Option<Self>

fn try_from(u: u32) -> Option<Self>

fn try_from(u: u64) -> Option<Self>

fn try_from(u: u256) -> Option<Self>

fn try_from(u: U128) -> Option<Self>

fn hash(
self,
refmut state: Hasher,
)