pub trait One {
// Required method
fn one() -> Self;
}Expand description
Implementation detail: simply extends the integer primitives so they have a static method that returns a 1 of the specific integer type.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".