pub trait Integer: Primitive + PrimInt {
const MIN: Self;
const MAX: Self;
const ZERO: Self;
const ONE: Self;
const TWO: Self;
// Provided method
fn safe_clamp(self, min: Self, max: Self) -> Self { ... }
}Required Associated Constants§
const MIN: Self
const MAX: Self
const ZERO: Self
const ONE: Self
const TWO: Self
Provided Methods§
fn safe_clamp(self, min: Self, max: Self) -> Self
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.