[][src]Trait nummap::NonZero

pub trait NonZero<Num>: ToNumber<Num> + Copy + Sized where
    Num: Number
{ type Optional: ToNumber<Num> = Option<Self>; fn new(num: Num) -> Option<Self>;
unsafe fn new_unchecked(num: Num) -> Self; }

A marker trait for types which are NonZero numbers.

Associated Types

type Optional: ToNumber<Num> = Option<Self>

The optional equivelant of this

Loading content...

Required methods

fn new(num: Num) -> Option<Self>

Constructs a new value returning None for 0.

unsafe fn new_unchecked(num: Num) -> Self

Constructs a new value assuming it is not 0.

Loading content...

Implementations on Foreign Types

impl NonZero<usize> for NonZeroUsize[src]

type Optional: ToNumber<Num> = Option<Self>

impl NonZero<u8> for NonZeroU8[src]

type Optional: ToNumber<Num> = Option<Self>

impl NonZero<u16> for NonZeroU16[src]

type Optional: ToNumber<Num> = Option<Self>

impl NonZero<u32> for NonZeroU32[src]

type Optional: ToNumber<Num> = Option<Self>

impl NonZero<u64> for NonZeroU64[src]

type Optional: ToNumber<Num> = Option<Self>

impl NonZero<u128> for NonZeroU128[src]

type Optional: ToNumber<Num> = Option<Self>

impl NonZero<isize> for NonZeroIsize[src]

type Optional: ToNumber<Num> = Option<Self>

impl NonZero<i8> for NonZeroI8[src]

type Optional: ToNumber<Num> = Option<Self>

impl NonZero<i16> for NonZeroI16[src]

type Optional: ToNumber<Num> = Option<Self>

impl NonZero<i32> for NonZeroI32[src]

type Optional: ToNumber<Num> = Option<Self>

impl NonZero<i64> for NonZeroI64[src]

type Optional: ToNumber<Num> = Option<Self>

impl NonZero<i128> for NonZeroI128[src]

type Optional: ToNumber<Num> = Option<Self>

impl NonZero<f32> for NonZeroU32[src]

type Optional: ToNumber<Num> = Option<Self>

impl NonZero<f64> for NonZeroU64[src]

type Optional: ToNumber<Num> = Option<Self>

Loading content...

Implementors

Loading content...