Trait One

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

Source

fn one() -> 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.

Implementations on Foreign Types§

Source§

impl One for i8

Source§

fn one() -> i8

Source§

impl One for i16

Source§

impl One for i32

Source§

impl One for i64

Source§

impl One for i128

Source§

impl One for isize

Source§

impl One for u8

Source§

fn one() -> u8

Source§

impl One for u16

Source§

impl One for u32

Source§

impl One for u64

Source§

impl One for u128

Source§

impl One for usize

Implementors§