pub struct NonZeroU8(/* private fields */);Implementations§
Source§impl NonZeroU8
impl NonZeroU8
Sourcepub const unsafe fn new_unchecked(value: u8) -> Self
pub const unsafe fn new_unchecked(value: u8) -> Self
Creates a non-zero without checking whether the value is non-zero. This results in undefined behaviour if the value is zero.
§Safety
The value must not be zero.
pub const fn get(self) -> u8
pub const fn into_std(self) -> NonZeroU8
pub const fn from_std(value: NonZeroU8) -> Self
Trait Implementations§
Source§impl Ord for NonZeroU8
impl Ord for NonZeroU8
Source§impl PartialOrd for NonZeroU8
impl PartialOrd for NonZeroU8
impl ConstParamTy_ for NonZeroU8
impl Copy for NonZeroU8
impl Eq for NonZeroU8
impl StructuralPartialEq for NonZeroU8
Auto Trait Implementations§
impl Freeze for NonZeroU8
impl RefUnwindSafe for NonZeroU8
impl Send for NonZeroU8
impl Sync for NonZeroU8
impl Unpin for NonZeroU8
impl UnwindSafe for NonZeroU8
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