pub trait ConstantsTrait: Sized {
// Required methods
fn zero() -> &'static Self;
fn one() -> &'static Self;
fn two() -> &'static Self;
fn three() -> &'static Self;
fn four() -> &'static Self;
fn five() -> &'static Self;
}
Expand description
Trait to implement constant numbers
Required 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.