The remainder operator %. Types implementing this trait support the remainder operation via the % operator.

Signature

pub trait Rem

Examples

assert!(3_u8 % 2_u8 == 1_u8);

Trait functions

rem

Performs the % operation.

Signature

fn rem(lhs: T, rhs: T) -> T

Examples

assert!(12_u8 % 10_u8 == 2_u8);