%.
Types implementing this trait support the remainder operation via the % operator.
Signature
Examples
Trait functions
rem
Performs the% operation.
%.
Types implementing this trait support the remainder operation via the % operator.
pub trait Rem
assert!(3_u8 % 2_u8 == 1_u8);
% operation.
fn rem(lhs: T, rhs: T) -> T
assert!(12_u8 % 10_u8 == 2_u8);
Was this page helpful?