#[repr(transparent)]pub struct NonZeroU64Inner(u64 is 1..=);🔬This is a nightly-only experimental API. (
temporary_niche_types)Tuple Fields§
§0: u64 is 1..=🔬This is a nightly-only experimental API. (
temporary_niche_types)Implementations§
Source§impl NonZeroU64Inner
impl NonZeroU64Inner
pub const fn new(val: u64) -> Option<Self>
🔬This is a nightly-only experimental API. (
temporary_niche_types)Sourcepub const unsafe fn new_unchecked(val: u64) -> Self
🔬This is a nightly-only experimental API. (temporary_niche_types)
pub const unsafe fn new_unchecked(val: u64) -> 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) -> u64
🔬This is a nightly-only experimental API. (
temporary_niche_types)Trait Implementations§
Source§impl Clone for NonZeroU64Inner
impl Clone for NonZeroU64Inner
Source§fn clone(&self) -> NonZeroU64Inner
fn clone(&self) -> NonZeroU64Inner
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 NonZeroU64Inner
Source§impl Debug for NonZeroU64Inner
impl Debug for NonZeroU64Inner
Source§impl Eq for NonZeroU64Inner
impl Eq for NonZeroU64Inner
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 NonZeroU64Inner
impl Hash for NonZeroU64Inner
Source§impl Ord for NonZeroU64Inner
impl Ord for NonZeroU64Inner
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 NonZeroU64Inner
impl PartialEq for NonZeroU64Inner
Source§impl PartialOrd for NonZeroU64Inner
impl PartialOrd for NonZeroU64Inner
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 NonZeroU64Inner
impl TrivialClone for NonZeroU64Inner
Auto Trait Implementations§
impl Freeze for NonZeroU64Inner
impl RefUnwindSafe for NonZeroU64Inner
impl Send for NonZeroU64Inner
impl Sync for NonZeroU64Inner
impl Unpin for NonZeroU64Inner
impl UnsafeUnpin for NonZeroU64Inner
impl UnwindSafe for NonZeroU64Inner
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