pub struct NonZero<T>(/* private fields */);Implementations§
Source§impl<T> NonZero<T>where
T: UnsignedModularInt,
impl<T> NonZero<T>where
T: UnsignedModularInt,
pub fn new(value: T) -> Option<Self>
pub fn get(self) -> T
pub fn as_ref(&self) -> &T
pub fn bits(&self) -> u32
pub fn bits_precision(&self) -> u32
pub fn to_be_bytes(&self) -> T::Bytes
pub fn to_be_bytes_trimmed_vartime(&self) -> Box<[u8]>
Available on crate feature
alloc only.Trait Implementations§
Source§impl<T: PartialEq> PartialEq for NonZero<T>
impl<T: PartialEq> PartialEq for NonZero<T>
impl<T: Eq> Eq for NonZero<T>
impl<T> StructuralPartialEq for NonZero<T>
Auto Trait Implementations§
impl<T> Freeze for NonZero<T>where
T: Freeze,
impl<T> RefUnwindSafe for NonZero<T>where
T: RefUnwindSafe,
impl<T> Send for NonZero<T>where
T: Send,
impl<T> Sync for NonZero<T>where
T: Sync,
impl<T> Unpin for NonZero<T>where
T: Unpin,
impl<T> UnsafeUnpin for NonZero<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for NonZero<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more