pub struct NonZeroI8(/* private fields */);Implementations§
Source§impl NonZeroI8
impl NonZeroI8
Sourcepub const unsafe fn new_unchecked(value: i8) -> Self
pub const unsafe fn new_unchecked(value: i8) -> 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) -> i8
pub const fn into_std(self) -> NonZeroI8
pub const fn from_std(value: NonZeroI8) -> Self
Trait Implementations§
Source§impl Ord for NonZeroI8
impl Ord for NonZeroI8
Source§impl PartialOrd for NonZeroI8
impl PartialOrd for NonZeroI8
impl ConstParamTy_ for NonZeroI8
impl Copy for NonZeroI8
impl Eq for NonZeroI8
impl StructuralPartialEq for NonZeroI8
Auto Trait Implementations§
impl Freeze for NonZeroI8
impl RefUnwindSafe for NonZeroI8
impl Send for NonZeroI8
impl Sync for NonZeroI8
impl Unpin for NonZeroI8
impl UnwindSafe for NonZeroI8
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