Trait ConstantsTrait

Source
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§

Source

fn zero() -> &'static Self

Zero

Source

fn one() -> &'static Self

One

Source

fn two() -> &'static Self

Two

Source

fn three() -> &'static Self

Three

Source

fn four() -> &'static Self

Four

Source

fn five() -> &'static Self

Five

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.

Implementors§