pub struct NonZeroInt(/* private fields */);Expand description
Introduced in Conway negInt64 = -9223372036854775808 .. -1 posInt64 = 1 .. 9223372036854775807 nonZeroInt64 = negInt64 / posInt64 ; this is the same as the current int64 definition but without zero
Trait Implementations§
Source§impl Clone for NonZeroInt
impl Clone for NonZeroInt
Source§fn clone(&self) -> NonZeroInt
fn clone(&self) -> NonZeroInt
Returns a duplicate 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 Debug for NonZeroInt
impl Debug for NonZeroInt
Source§impl<'b, C> Decode<'b, C> for NonZeroInt
impl<'b, C> Decode<'b, C> for NonZeroInt
Source§impl<'de> Deserialize<'de> for NonZeroInt
impl<'de> Deserialize<'de> for NonZeroInt
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NonZeroInt, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NonZeroInt, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<C> Encode<C> for NonZeroInt
impl<C> Encode<C> for NonZeroInt
Source§impl Hash for NonZeroInt
impl Hash for NonZeroInt
Source§impl Ord for NonZeroInt
impl Ord for NonZeroInt
Source§fn cmp(&self, other: &NonZeroInt) -> Ordering
fn cmp(&self, other: &NonZeroInt) -> 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 NonZeroInt
impl PartialEq for NonZeroInt
Source§impl PartialOrd for NonZeroInt
impl PartialOrd for NonZeroInt
Source§impl Serialize for NonZeroInt
impl Serialize for NonZeroInt
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<i64> for NonZeroInt
impl TryFrom<i64> for NonZeroInt
impl Copy for NonZeroInt
impl Eq for NonZeroInt
impl StructuralPartialEq for NonZeroInt
Auto Trait Implementations§
impl Freeze for NonZeroInt
impl RefUnwindSafe for NonZeroInt
impl Send for NonZeroInt
impl Sync for NonZeroInt
impl Unpin for NonZeroInt
impl UnsafeUnpin for NonZeroInt
impl UnwindSafe for NonZeroInt
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more