[−][src]Trait nonzero_ext::NonZero
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
type Primitive
The primitive type (e.g. u8
) underlying this integral type.
Required methods
fn new(n: Self::Primitive) -> Option<Self> where
Self: Sized,
Self: Sized,
Creates a new non-zero object from an integer that might be zero.
fn get(self) -> Self::Primitive
Returns the value as a primitive type.