Trait nonzero_ext::NonZero[][src]

pub trait NonZero {
    type Primitive;
    fn new(n: Self::Primitive) -> Option<Self>
    where
        Self: Sized
;
fn get(self) -> Self::Primitive; }

A trait identifying a non-zero integral type. It is useful mostly in order to give to genericized helper functions as impl NonZero arguments.

Associated Types

The primitive type (e.g. u8) underlying this integral type.

Required Methods

Creates a new non-zero object from an integer that might be zero.

Returns the value as a primitive type.

Implementations on Foreign Types

impl NonZero for NonZeroU8
[src]

impl NonZero for NonZeroU16
[src]

impl NonZero for NonZeroU32
[src]

impl NonZero for NonZeroU64
[src]

impl NonZero for NonZeroU128
[src]

impl NonZero for NonZeroUsize
[src]

Implementors