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§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.