pub trait Modulus<T>: Integer + Unsigned{
// Provided method
fn cast(self) -> T { ... }
}
Expand description
Modulus is an unsigned integer that can be cast to some other type T
.
The purpose is to restrict the modulus to unsigned integers yet allow calculations with signed integers
when necessary.
Provided Methods§
Object Safety§
This trait is not object safe.