type AccumCount = Overflowing<i128>;
Expand description
The type for accumulator counting. Set to Overflowing<u128>
.
Aliased Type§
struct AccumCount(/* private fields */);
Implementations
Source§impl<T> Overflowing<T>
impl<T> Overflowing<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Returns the inner value.
Source§impl Overflowing<i128>
impl Overflowing<i128>
Sourcepub const MINUS_ONE: Overflowing<i128> = _
pub const MINUS_ONE: Overflowing<i128> = _
The value minus one.
Sourcepub fn abs(self) -> Overflowing<i128>
pub fn abs(self) -> Overflowing<i128>
Returns the absolute value of the number.
Sourcepub fn unsigned_abs(self) -> u128
pub fn unsigned_abs(self) -> u128
Returns the absolute value of the number as an unsigned integer.
Sourcepub fn is_positive(self) -> bool
pub fn is_positive(self) -> bool
Returns true
if the number is positive and false
if the number is zero
or negative.
§Examples
assert!(!Overflowing::<i64>::from(-10i32).is_positive());
assert!(Overflowing::<i64>::from(10i32).is_positive());
Sourcepub fn is_negative(self) -> bool
pub fn is_negative(self) -> bool
Returns true
if the number is negative and false
if the number is zero
or positive.
§Examples
assert!(Overflowing::<i64>::from(-10i32).is_negative());
assert!(!Overflowing::<i64>::from(10i32).is_negative());
Source§impl Overflowing<i128>
impl Overflowing<i128>
Sourcepub const ZERO: Overflowing<i128> = _
pub const ZERO: Overflowing<i128> = _
The value zero.
Sourcepub const ONE: Overflowing<i128> = _
pub const ONE: Overflowing<i128> = _
The value one.
Sourcepub const MIN: Overflowing<i128> = _
pub const MIN: Overflowing<i128> = _
The minimum value.
Sourcepub const MAX: Overflowing<i128> = _
pub const MAX: Overflowing<i128> = _
The maximum value.
Sourcepub fn checked_add(self, rhs: Overflowing<i128>) -> Option<Overflowing<i128>>
pub fn checked_add(self, rhs: Overflowing<i128>) -> Option<Overflowing<i128>>
Checked addition. Returns None
if overflow occurred.
Sourcepub fn wrapping_add(self, rhs: Overflowing<i128>) -> Overflowing<i128>
pub fn wrapping_add(self, rhs: Overflowing<i128>) -> Overflowing<i128>
Wrapping addition.
Sourcepub fn checked_mul(self, rhs: Overflowing<i128>) -> Option<Overflowing<i128>>
pub fn checked_mul(self, rhs: Overflowing<i128>) -> Option<Overflowing<i128>>
Checked multiplication. Returns None
if overflow occurred.
Sourcepub fn wrapping_mul(self, rhs: Overflowing<i128>) -> Overflowing<i128>
pub fn wrapping_mul(self, rhs: Overflowing<i128>) -> Overflowing<i128>
Wrapping multiplication.
Trait Implementations
Source§impl<'a> Add<&'a Overflowing<i128>> for Overflowing<i128>
impl<'a> Add<&'a Overflowing<i128>> for Overflowing<i128>
Source§type Output = Overflowing<i128>
type Output = Overflowing<i128>
The resulting type after applying the
+
operator.Source§fn add(
self,
rhs: &'a Overflowing<i128>,
) -> <Overflowing<i128> as Add<&'a Overflowing<i128>>>::Output
fn add( self, rhs: &'a Overflowing<i128>, ) -> <Overflowing<i128> as Add<&'a Overflowing<i128>>>::Output
Performs the
+
operation. Read moreSource§impl Add for Overflowing<i128>
impl Add for Overflowing<i128>
Source§type Output = Overflowing<i128>
type Output = Overflowing<i128>
The resulting type after applying the
+
operator.Source§fn add(self, rhs: Overflowing<i128>) -> <Overflowing<i128> as Add>::Output
fn add(self, rhs: Overflowing<i128>) -> <Overflowing<i128> as Add>::Output
Performs the
+
operation. Read moreSource§impl AddAssign<&Overflowing<i128>> for Overflowing<i128>
impl AddAssign<&Overflowing<i128>> for Overflowing<i128>
Source§fn add_assign(&mut self, rhs: &Overflowing<i128>)
fn add_assign(&mut self, rhs: &Overflowing<i128>)
Performs the
+=
operation. Read moreSource§impl AddAssign for Overflowing<i128>
impl AddAssign for Overflowing<i128>
Source§fn add_assign(&mut self, rhs: Overflowing<i128>)
fn add_assign(&mut self, rhs: Overflowing<i128>)
Performs the
+=
operation. Read moreSource§impl<T> Arbitrary for Overflowing<T>where
T: Arbitrary,
impl<T> Arbitrary for Overflowing<T>where
T: Arbitrary,
Source§type Parameters = <T as Arbitrary>::Parameters
type Parameters = <T as Arbitrary>::Parameters
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.Source§type Strategy = Map<<T as Arbitrary>::Strategy, fn(_: T) -> Overflowing<T>>
type Strategy = Map<<T as Arbitrary>::Strategy, fn(_: T) -> Overflowing<T>>
The type of
Strategy
used to generate values of type Self
.Source§fn arbitrary_with(
_top: <Overflowing<T> as Arbitrary>::Parameters,
) -> <Overflowing<T> as Arbitrary>::Strategy
fn arbitrary_with( _top: <Overflowing<T> as Arbitrary>::Parameters, ) -> <Overflowing<T> as Arbitrary>::Strategy
Source§impl<T> CastFrom<T> for Overflowing<i128>
impl<T> CastFrom<T> for Overflowing<i128>
Source§fn cast_from(value: T) -> Overflowing<i128>
fn cast_from(value: T) -> Overflowing<i128>
Performs the cast.
Source§impl<T> Clone for Overflowing<T>where
T: Clone,
impl<T> Clone for Overflowing<T>where
T: Clone,
Source§fn clone(&self) -> Overflowing<T>
fn clone(&self) -> Overflowing<T>
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<T> Columnar for Overflowing<T>
impl<T> Columnar for Overflowing<T>
Source§type Ref<'a> = Overflowing<T>
type Ref<'a> = Overflowing<T>
For each lifetime, a reference with that lifetime. Read more
Source§type Container = Overflows<T, Vec<T>>
type Container = Overflows<T, Vec<T>>
The type that stores the columnar representation. Read more
Source§fn into_owned<'a>(
other: <Overflowing<T> as Columnar>::Ref<'a>,
) -> Overflowing<T>
fn into_owned<'a>( other: <Overflowing<T> as Columnar>::Ref<'a>, ) -> Overflowing<T>
Produce an instance of
Self
from Self::Ref<'a>
.Source§fn copy_from<'a>(&mut self, other: Self::Ref<'a>)where
Self: Sized,
fn copy_from<'a>(&mut self, other: Self::Ref<'a>)where
Self: Sized,
Repopulates
self
from a reference. Read moreSource§fn as_columns<'a, I>(selves: I) -> Self::Containerwhere
I: IntoIterator<Item = &'a Self>,
Self: 'a,
fn as_columns<'a, I>(selves: I) -> Self::Containerwhere
I: IntoIterator<Item = &'a Self>,
Self: 'a,
Converts a sequence of the references to the type into columnar form.
Source§fn into_columns<I>(selves: I) -> Self::Containerwhere
I: IntoIterator<Item = Self>,
Self: Sized,
fn into_columns<I>(selves: I) -> Self::Containerwhere
I: IntoIterator<Item = Self>,
Self: Sized,
Converts a sequence of the type into columnar form. Read more
Source§impl Columnation for Overflowing<i128>
impl Columnation for Overflowing<i128>
Source§type InnerRegion = CopyRegion<Overflowing<i128>>
type InnerRegion = CopyRegion<Overflowing<i128>>
The type of region capable of absorbing allocations owned by
the
Self
type. Note: not allocations of Self
, but of the
things that it owns.Source§impl<T> Debug for Overflowing<T>where
T: Debug,
impl<T> Debug for Overflowing<T>where
T: Debug,
Source§impl<T> Default for Overflowing<T>where
T: Default,
impl<T> Default for Overflowing<T>where
T: Default,
Source§fn default() -> Overflowing<T>
fn default() -> Overflowing<T>
Returns the “default value” for a type. Read more
Source§impl<'de, T> Deserialize<'de> for Overflowing<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Overflowing<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Overflowing<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Overflowing<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Abelian for Overflowing<i128>
impl Abelian for Overflowing<i128>
Source§impl<T> Display for Overflowing<T>where
T: Display,
impl<T> Display for Overflowing<T>where
T: Display,
Source§impl Div for Overflowing<i128>
impl Div for Overflowing<i128>
Source§impl From<Overflowing<bool>> for Overflowing<i128>
impl From<Overflowing<bool>> for Overflowing<i128>
Source§fn from(value: Overflowing<bool>) -> Overflowing<i128>
fn from(value: Overflowing<bool>) -> Overflowing<i128>
Converts to this type from the input type.
Source§impl From<Overflowing<i16>> for Overflowing<i128>
impl From<Overflowing<i16>> for Overflowing<i128>
Source§fn from(value: Overflowing<i16>) -> Overflowing<i128>
fn from(value: Overflowing<i16>) -> Overflowing<i128>
Converts to this type from the input type.
Source§impl From<Overflowing<i32>> for Overflowing<i128>
impl From<Overflowing<i32>> for Overflowing<i128>
Source§fn from(value: Overflowing<i32>) -> Overflowing<i128>
fn from(value: Overflowing<i32>) -> Overflowing<i128>
Converts to this type from the input type.
Source§impl From<Overflowing<i64>> for Overflowing<i128>
impl From<Overflowing<i64>> for Overflowing<i128>
Source§fn from(value: Overflowing<i64>) -> Overflowing<i128>
fn from(value: Overflowing<i64>) -> Overflowing<i128>
Converts to this type from the input type.
Source§impl From<Overflowing<i8>> for Overflowing<i128>
impl From<Overflowing<i8>> for Overflowing<i128>
Source§fn from(value: Overflowing<i8>) -> Overflowing<i128>
fn from(value: Overflowing<i8>) -> Overflowing<i128>
Converts to this type from the input type.
Source§impl From<Overflowing<u16>> for Overflowing<i128>
impl From<Overflowing<u16>> for Overflowing<i128>
Source§fn from(value: Overflowing<u16>) -> Overflowing<i128>
fn from(value: Overflowing<u16>) -> Overflowing<i128>
Converts to this type from the input type.
Source§impl From<Overflowing<u32>> for Overflowing<i128>
impl From<Overflowing<u32>> for Overflowing<i128>
Source§fn from(value: Overflowing<u32>) -> Overflowing<i128>
fn from(value: Overflowing<u32>) -> Overflowing<i128>
Converts to this type from the input type.
Source§impl From<Overflowing<u64>> for Overflowing<i128>
impl From<Overflowing<u64>> for Overflowing<i128>
Source§fn from(value: Overflowing<u64>) -> Overflowing<i128>
fn from(value: Overflowing<u64>) -> Overflowing<i128>
Converts to this type from the input type.
Source§impl From<Overflowing<u8>> for Overflowing<i128>
impl From<Overflowing<u8>> for Overflowing<i128>
Source§fn from(value: Overflowing<u8>) -> Overflowing<i128>
fn from(value: Overflowing<u8>) -> Overflowing<i128>
Converts to this type from the input type.
Source§impl FromStr for Overflowing<i128>
impl FromStr for Overflowing<i128>
Source§impl Hash for Overflowing<i128>
impl Hash for Overflowing<i128>
Source§impl IsZero for Overflowing<i128>
impl IsZero for Overflowing<i128>
Source§impl Monoid for Overflowing<i128>
impl Monoid for Overflowing<i128>
Source§fn zero() -> Overflowing<i128>
fn zero() -> Overflowing<i128>
A zero element under the semigroup addition operator.
Source§impl Mul for Overflowing<i128>
impl Mul for Overflowing<i128>
Source§type Output = Overflowing<i128>
type Output = Overflowing<i128>
The resulting type after applying the
*
operator.Source§fn mul(self, rhs: Overflowing<i128>) -> <Overflowing<i128> as Mul>::Output
fn mul(self, rhs: Overflowing<i128>) -> <Overflowing<i128> as Mul>::Output
Performs the
*
operation. Read moreSource§impl Multiply for Overflowing<i128>
impl Multiply for Overflowing<i128>
Source§type Output = Overflowing<i128>
type Output = Overflowing<i128>
Output type per the
Mul
trait.Source§fn multiply(
self,
rhs: &Overflowing<i128>,
) -> <Overflowing<i128> as Multiply>::Output
fn multiply( self, rhs: &Overflowing<i128>, ) -> <Overflowing<i128> as Multiply>::Output
Core method per the
Mul
trait.Source§impl Neg for Overflowing<i128>
impl Neg for Overflowing<i128>
Source§impl Num for Overflowing<i128>
impl Num for Overflowing<i128>
type FromStrRadixErr = <i128 as Num>::FromStrRadixErr
Source§fn from_str_radix(
str: &str,
radix: u32,
) -> Result<Overflowing<i128>, <Overflowing<i128> as Num>::FromStrRadixErr>
fn from_str_radix( str: &str, radix: u32, ) -> Result<Overflowing<i128>, <Overflowing<i128> as Num>::FromStrRadixErr>
Convert from a string and radix (typically
2..=36
). Read moreSource§impl One for Overflowing<i128>
impl One for Overflowing<i128>
Source§fn one() -> Overflowing<i128>
fn one() -> Overflowing<i128>
Source§impl<T> Ord for Overflowing<T>where
T: Ord,
impl<T> Ord for Overflowing<T>where
T: Ord,
Source§fn cmp(&self, other: &Overflowing<T>) -> Ordering
fn cmp(&self, other: &Overflowing<T>) -> 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<T> PartialEq for Overflowing<T>where
T: PartialEq,
impl<T> PartialEq for Overflowing<T>where
T: PartialEq,
Source§impl<T> PartialOrd for Overflowing<T>where
T: PartialOrd,
impl<T> PartialOrd for Overflowing<T>where
T: PartialOrd,
Source§impl Rem for Overflowing<i128>
impl Rem for Overflowing<i128>
Source§impl Semigroup for Overflowing<i128>
impl Semigroup for Overflowing<i128>
Source§fn plus_equals(&mut self, rhs: &Overflowing<i128>)
fn plus_equals(&mut self, rhs: &Overflowing<i128>)
The method of
std::ops::AddAssign
, for types that do not implement AddAssign
.Source§impl<T> Serialize for Overflowing<T>where
T: Serialize,
impl<T> Serialize for Overflowing<T>where
T: Serialize,
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 Signed for Overflowing<i128>
impl Signed for Overflowing<i128>
Source§fn abs_sub(&self, other: &Overflowing<i128>) -> Overflowing<i128>
fn abs_sub(&self, other: &Overflowing<i128>) -> Overflowing<i128>
The positive difference of two numbers. Read more
Source§fn is_positive(&self) -> bool
fn is_positive(&self) -> bool
Returns true if the number is positive and false if the number is zero or negative.
Source§fn is_negative(&self) -> bool
fn is_negative(&self) -> bool
Returns true if the number is negative and false if the number is zero or positive.
Source§impl<'a> Sub<&'a Overflowing<i128>> for Overflowing<i128>
impl<'a> Sub<&'a Overflowing<i128>> for Overflowing<i128>
Source§type Output = Overflowing<i128>
type Output = Overflowing<i128>
The resulting type after applying the
-
operator.Source§fn sub(
self,
rhs: &'a Overflowing<i128>,
) -> <Overflowing<i128> as Sub<&'a Overflowing<i128>>>::Output
fn sub( self, rhs: &'a Overflowing<i128>, ) -> <Overflowing<i128> as Sub<&'a Overflowing<i128>>>::Output
Performs the
-
operation. Read moreSource§impl Sub for Overflowing<i128>
impl Sub for Overflowing<i128>
Source§type Output = Overflowing<i128>
type Output = Overflowing<i128>
The resulting type after applying the
-
operator.Source§fn sub(self, rhs: Overflowing<i128>) -> <Overflowing<i128> as Sub>::Output
fn sub(self, rhs: Overflowing<i128>) -> <Overflowing<i128> as Sub>::Output
Performs the
-
operation. Read moreSource§impl SubAssign<&Overflowing<i128>> for Overflowing<i128>
impl SubAssign<&Overflowing<i128>> for Overflowing<i128>
Source§fn sub_assign(&mut self, rhs: &Overflowing<i128>)
fn sub_assign(&mut self, rhs: &Overflowing<i128>)
Performs the
-=
operation. Read moreSource§impl SubAssign for Overflowing<i128>
impl SubAssign for Overflowing<i128>
Source§fn sub_assign(&mut self, rhs: Overflowing<i128>)
fn sub_assign(&mut self, rhs: Overflowing<i128>)
Performs the
-=
operation. Read moreSource§impl<'a> Sum<&'a Overflowing<i128>> for Overflowing<i128>
impl<'a> Sum<&'a Overflowing<i128>> for Overflowing<i128>
Source§fn sum<I>(iter: I) -> Overflowing<i128>
fn sum<I>(iter: I) -> Overflowing<i128>
Takes an iterator and generates
Self
from the elements by “summing up”
the items.Source§impl Sum for Overflowing<i128>
impl Sum for Overflowing<i128>
Source§fn sum<I>(iter: I) -> Overflowing<i128>
fn sum<I>(iter: I) -> Overflowing<i128>
Takes an iterator and generates
Self
from the elements by “summing up”
the items.