#[repr(transparent)]pub struct NonZeroI8Inner(i8 is (..=0 | 1..=));🔬This is a nightly-only experimental API. (
temporary_niche_types)Tuple Fields§
§0: i8 is (..=0 | 1..=)🔬This is a nightly-only experimental API. (
temporary_niche_types)Implementations§
Source§impl NonZeroI8Inner
impl NonZeroI8Inner
pub const fn new(val: i8) -> Option<Self>
🔬This is a nightly-only experimental API. (
temporary_niche_types)Sourcepub const unsafe fn new_unchecked(val: i8) -> Self
🔬This is a nightly-only experimental API. (temporary_niche_types)
pub const unsafe fn new_unchecked(val: i8) -> Self
temporary_niche_types)Constructs an instance of this type from the underlying integer primitive without checking whether its valid.
§Safety
Immediate language UB if val is not within the valid range for this
type, as it violates the validity invariant.
pub const fn as_inner(self) -> i8
🔬This is a nightly-only experimental API. (
temporary_niche_types)Trait Implementations§
Source§impl Clone for NonZeroI8Inner
impl Clone for NonZeroI8Inner
Source§fn clone(&self) -> NonZeroI8Inner
fn clone(&self) -> NonZeroI8Inner
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)where
Self:,
fn clone_from(&mut self, source: &Self)where
Self:,
Performs copy-assignment from
source. Read moreimpl Copy for NonZeroI8Inner
Source§impl Debug for NonZeroI8Inner
impl Debug for NonZeroI8Inner
Source§impl Eq for NonZeroI8Inner
impl Eq for NonZeroI8Inner
1.0.0 (const: unstable) · Source§#[doc(hidden)]fn assert_receiver_is_total_eq(&self)
#[doc(hidden)]fn assert_receiver_is_total_eq(&self)
👎Deprecated since 1.95.0:
implementation detail of #[derive(Eq)]
Source§#[doc(hidden)]fn assert_fields_are_eq(&self)
#[doc(hidden)]fn assert_fields_are_eq(&self)
🔬This is a nightly-only experimental API. (
derive_eq_internals)Source§impl Hash for NonZeroI8Inner
impl Hash for NonZeroI8Inner
Source§impl Ord for NonZeroI8Inner
impl Ord for NonZeroI8Inner
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for NonZeroI8Inner
impl PartialEq for NonZeroI8Inner
Source§impl PartialOrd for NonZeroI8Inner
impl PartialOrd for NonZeroI8Inner
Source§fn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
Source§#[doc(hidden)]fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
🔬This is a nightly-only experimental API. (
partial_ord_chaining_methods)If
self == other, returns ControlFlow::Continue(()).
Otherwise, returns ControlFlow::Break(self < other). Read moreSource§#[doc(hidden)]fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
🔬This is a nightly-only experimental API. (
partial_ord_chaining_methods)Same as
__chaining_lt, but for <= instead of <.Source§#[doc(hidden)]fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
🔬This is a nightly-only experimental API. (
partial_ord_chaining_methods)Same as
__chaining_lt, but for > instead of <.Source§#[doc(hidden)]fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
🔬This is a nightly-only experimental API. (
partial_ord_chaining_methods)Same as
__chaining_lt, but for >= instead of <.impl StructuralPartialEq for NonZeroI8Inner
impl TrivialClone for NonZeroI8Inner
Auto Trait Implementations§
impl Freeze for NonZeroI8Inner
impl RefUnwindSafe for NonZeroI8Inner
impl Send for NonZeroI8Inner
impl Sync for NonZeroI8Inner
impl Unpin for NonZeroI8Inner
impl UnsafeUnpin for NonZeroI8Inner
impl UnwindSafe for NonZeroI8Inner
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> NonDrop for Twhere
T: Copy,
impl<T> Printable for T
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize = _
#[doc(hidden)]const SIZE: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize = _
#[doc(hidden)]const ALIGN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment = _
#[doc(hidden)]const ALIGNMENT: Alignment = _
🔬This is a nightly-only experimental API. (
ptr_alignment_type #102070)Source§#[doc(hidden)]const IS_ZST: bool = _
#[doc(hidden)]const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout = _
#[doc(hidden)]const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize = _
#[doc(hidden)]const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)The largest safe length for a
[Self]. Read more