Trait style::One

source ·
pub trait One {
    // Required methods
    fn one() -> Self;
    fn is_one(&self) -> bool;
}
Expand description

A trait pretty much similar to num_traits::One, but without the need of implementing Mul.

Required Methods§

source

fn one() -> Self

Reutrns the one value.

source

fn is_one(&self) -> bool

Returns whether this value is one.

Implementors§

source§

impl One for Integer

source§

impl One for style::values::computed::NonNegativeNumber

source§

impl One for style::values::specified::NonNegativeNumber

source§

impl<T> One for Twhere T: One + PartialEq,