One

Trait One 

Source
pub trait One {
    // Required method
    fn one() -> Self;
}
Expand description

Trait for types that can provide a value representing “one”

Required Methods§

Source

fn one() -> Self

Returns a value representing “one” for this type

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 f32

Source§

fn one() -> Self

Source§

impl One for f64

Source§

fn one() -> Self

Source§

impl One for i32

Source§

fn one() -> Self

Source§

impl One for i64

Source§

fn one() -> Self

Source§

impl One for u32

Source§

fn one() -> Self

Source§

impl One for u64

Source§

fn one() -> Self

Implementors§