Struct core::nonzero::NonZero
[−]
[src]
pub struct NonZero<T: Zeroable>(_);
A wrapper type for raw pointers and integers that will never be NULL or 0 that might allow certain optimizations.
Methods
impl<T: Zeroable> NonZero<T>
const unsafe fn new(inner: T) -> NonZero<T>
Creates an instance of NonZero with the provided value. You must indeed ensure that the value is actually "non-zero".