pub struct NonZeroFixedUInt<T, const N: usize, P: Personality>(/* private fields */)
where
T: MachineWord;Expand description
Non-zero FixedUInt. Constructed via HasNonZero::into_nonzero.
#[repr(transparent)] over FixedUInt<T, N, P> — the layout is
identical, so NonZeroFixedUInt can round-trip through FFI at the
same ABI as the inner. Always Copy (matches
HasNonZero::NonZero: Copy); the drop of the inner runs because
the field is owned, not because of the repr.
Implementations§
Source§impl<T, const N: usize, P: Personality> NonZeroFixedUInt<T, N, P>where
T: MachineWord,
impl<T, const N: usize, P: Personality> NonZeroFixedUInt<T, N, P>where
T: MachineWord,
Trait Implementations§
Source§impl<T, const N: usize, P: Clone + Personality> Clone for NonZeroFixedUInt<T, N, P>where
T: MachineWord + Clone,
impl<T, const N: usize, P: Clone + Personality> Clone for NonZeroFixedUInt<T, N, P>where
T: MachineWord + Clone,
Source§fn clone(&self) -> NonZeroFixedUInt<T, N, P>
fn clone(&self) -> NonZeroFixedUInt<T, N, P>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T, const N: usize> ConditionallySelectable for NonZeroFixedUInt<T, N, Ct>where
T: MachineWord + ConditionallySelectable,
impl<T, const N: usize> ConditionallySelectable for NonZeroFixedUInt<T, N, Ct>where
T: MachineWord + ConditionallySelectable,
Source§fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
Source§fn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Source§fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
Conditionally swap
self and other if choice == 1; otherwise,
reassign both unto themselves. Read moreimpl<T, const N: usize, P: Copy + Personality> Copy for NonZeroFixedUInt<T, N, P>where
T: MachineWord + Copy,
Source§impl<T: MachineWord + Debug, const N: usize> Debug for NonZeroFixedUInt<T, N, Nct>
impl<T: MachineWord + Debug, const N: usize> Debug for NonZeroFixedUInt<T, N, Nct>
Source§impl<T: MachineWord, const N: usize> Debug for NonZeroFixedUInt<T, N, Ct>
impl<T: MachineWord, const N: usize> Debug for NonZeroFixedUInt<T, N, Ct>
Source§impl<T, const N: usize, P: Personality> Default for NonZeroFixedUInt<T, N, P>where
T: MachineWord,
impl<T, const N: usize, P: Personality> Default for NonZeroFixedUInt<T, N, P>where
T: MachineWord,
impl<T, const N: usize, P: Eq + Personality> Eq for NonZeroFixedUInt<T, N, P>where
T: MachineWord + Eq,
Source§impl<T, const N: usize, P: PartialEq + Personality> PartialEq for NonZeroFixedUInt<T, N, P>where
T: MachineWord + PartialEq,
impl<T, const N: usize, P: PartialEq + Personality> PartialEq for NonZeroFixedUInt<T, N, P>where
T: MachineWord + PartialEq,
Source§fn eq(&self, other: &NonZeroFixedUInt<T, N, P>) -> bool
fn eq(&self, other: &NonZeroFixedUInt<T, N, P>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<T, const N: usize, P: PartialEq + Personality> StructuralPartialEq for NonZeroFixedUInt<T, N, P>where
T: MachineWord + PartialEq,
Auto Trait Implementations§
impl<T, const N: usize, P> Freeze for NonZeroFixedUInt<T, N, P>where
T: Freeze,
impl<T, const N: usize, P> RefUnwindSafe for NonZeroFixedUInt<T, N, P>where
T: RefUnwindSafe,
impl<T, const N: usize, P> Send for NonZeroFixedUInt<T, N, P>where
T: Send,
impl<T, const N: usize, P> Sync for NonZeroFixedUInt<T, N, P>where
T: Sync,
impl<T, const N: usize, P> Unpin for NonZeroFixedUInt<T, N, P>where
T: Unpin,
impl<T, const N: usize, P> UnsafeUnpin for NonZeroFixedUInt<T, N, P>where
T: UnsafeUnpin,
impl<T, const N: usize, P> UnwindSafe for NonZeroFixedUInt<T, N, P>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