Struct necsim_core_bond::NonZeroOneU64
source · pub struct NonZeroOneU64(/* private fields */);
Implementations§
source§impl NonZeroOneU64
impl NonZeroOneU64
sourcepub const fn new(value: u64) -> Result<Self, NonZeroOneU64Error>
pub const fn new(value: u64) -> Result<Self, NonZeroOneU64Error>
§Errors
Returns NonZeroOneU64Error
if not 1 < value
sourcepub const unsafe fn new_unchecked(value: u64) -> Self
pub const unsafe fn new_unchecked(value: u64) -> Self
Creates a non-zero, non-one u64 without checking the value.
§Safety
The value must not be zero or one.
pub const fn get(self) -> u64
Trait Implementations§
source§impl Clone for NonZeroOneU64
impl Clone for NonZeroOneU64
source§fn clone(&self) -> NonZeroOneU64
fn clone(&self) -> NonZeroOneU64
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl ComputeTypeSet for NonZeroOneU64
impl ComputeTypeSet for NonZeroOneU64
source§impl Debug for NonZeroOneU64
impl Debug for NonZeroOneU64
source§impl<'de> Deserialize<'de> for NonZeroOneU64
impl<'de> Deserialize<'de> for NonZeroOneU64
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for NonZeroOneU64
impl Display for NonZeroOneU64
source§impl From<NonZeroOneU64> for u64
impl From<NonZeroOneU64> for u64
source§fn from(val: NonZeroOneU64) -> Self
fn from(val: NonZeroOneU64) -> Self
Converts to this type from the input type.
source§impl Hash for NonZeroOneU64
impl Hash for NonZeroOneU64
source§impl Ord for NonZeroOneU64
impl Ord for NonZeroOneU64
source§fn cmp(&self, other: &NonZeroOneU64) -> Ordering
fn cmp(&self, other: &NonZeroOneU64) -> Ordering
1.21.0 · 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 NonZeroOneU64
impl PartialEq for NonZeroOneU64
source§fn eq(&self, other: &NonZeroOneU64) -> bool
fn eq(&self, other: &NonZeroOneU64) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for NonZeroOneU64
impl PartialOrd for NonZeroOneU64
source§fn partial_cmp(&self, other: &NonZeroOneU64) -> Option<Ordering>
fn partial_cmp(&self, other: &NonZeroOneU64) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for NonZeroOneU64
impl Serialize for NonZeroOneU64
source§impl TryFrom<u64> for NonZeroOneU64
impl TryFrom<u64> for NonZeroOneU64
source§impl TypeLayout for NonZeroOneU64
impl TypeLayout for NonZeroOneU64
§type Inhabited = <And<<NonZero<u64> as TypeLayout>::Inhabited, Inhabited> as ComputeInhabited>::Output
type Inhabited = <And<<NonZero<u64> as TypeLayout>::Inhabited, Inhabited> as ComputeInhabited>::Output
Marker type for whether the type is
inhabited or
uninhabited.
The associated type must be either [
inhabited::Inhabited
]
or [inhabited::Uninhabited
].source§const TYPE_LAYOUT: TypeLayoutInfo<'static> = _
const TYPE_LAYOUT: TypeLayoutInfo<'static> = _
Shallow layout of the type.
impl Copy for NonZeroOneU64
impl Eq for NonZeroOneU64
impl StructuralPartialEq for NonZeroOneU64
Auto Trait Implementations§
impl Freeze for NonZeroOneU64
impl RefUnwindSafe for NonZeroOneU64
impl Send for NonZeroOneU64
impl Sync for NonZeroOneU64
impl Unpin for NonZeroOneU64
impl UnwindSafe for NonZeroOneU64
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
§impl<T> ExtractDiscriminant for T
impl<T> ExtractDiscriminant for T
§type Discriminant = <T as ExtractDiscriminantSpec<<T as DiscriminantKind>::Discriminant>>::Ty
type Discriminant = <T as ExtractDiscriminantSpec<<T as DiscriminantKind>::Discriminant>>::Ty
The type of the discriminant, which must satisfy the trait bounds
required by
core::mem::Discriminant
. Read more§impl<T> TypeGraphLayout for Twhere
T: TypeLayout + ComputeTypeSet,
impl<T> TypeGraphLayout for Twhere
T: TypeLayout + ComputeTypeSet,
§const TYPE_GRAPH: TypeLayoutGraph<'static> = _
const TYPE_GRAPH: TypeLayoutGraph<'static> = _
Shallow layout of the type.