#[repr(transparent)]pub struct Multiplicity(pub u32);Expand description
AC multiplicity backed by u32 (32 bits).
Tuple Fields§
§0: u32Trait Implementations§
Source§impl Clone for Multiplicity
impl Clone for Multiplicity
impl Copy for Multiplicity
Source§impl Debug for Multiplicity
impl Debug for Multiplicity
Source§impl Default for Multiplicity
impl Default for Multiplicity
Source§impl Display for Multiplicity
impl Display for Multiplicity
impl Eq for Multiplicity
Source§impl From<Multiplicity> for u32
impl From<Multiplicity> for u32
Source§fn from(m: Multiplicity) -> Self
fn from(m: Multiplicity) -> Self
Converts to this type from the input type.
Source§impl From<u32> for Multiplicity
impl From<u32> for Multiplicity
Source§impl Hash for Multiplicity
impl Hash for Multiplicity
Source§impl MultiplicityLike for Multiplicity
impl MultiplicityLike for Multiplicity
Source§const ZERO: Self
const ZERO: Self
Multiplicity zero. Not a legal stored multiplicity — the multiset
representation is duplicate-free with every entry
>= ONE — but needed
as the identity for summation and as an “unbound” marker.Source§fn try_from_u64(n: u64) -> Option<Self>
fn try_from_u64(n: u64) -> Option<Self>
Source§fn checked_add(self, other: Self) -> Option<Self>
fn checked_add(self, other: Self) -> Option<Self>
Sum, or
None on overflow of this width.Source§fn saturating_sub(self, other: Self) -> Self
fn saturating_sub(self, other: Self) -> Self
Difference, clamped at
Self::ZERO.Source§impl Ord for Multiplicity
impl Ord for Multiplicity
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for Multiplicity
impl PartialEq for Multiplicity
Source§impl PartialOrd for Multiplicity
impl PartialOrd for Multiplicity
impl StructuralPartialEq for Multiplicity
Auto Trait Implementations§
impl Freeze for Multiplicity
impl RefUnwindSafe for Multiplicity
impl Send for Multiplicity
impl Sync for Multiplicity
impl Unpin for Multiplicity
impl UnsafeUnpin for Multiplicity
impl UnwindSafe for Multiplicity
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.