[−][src]Enum fraction::dynaint::DynaInt
The wrapper implementation
Keeps data within S (small) whenever possible, performing checked arithmetic and moving onto __H (huge) when overflows happen. Every math operation on __H performs a read of the resulting number with TryToConvertFrom::try_to_convert_from. Every math operation on S is checked for overflows.
Variants
S(T)Represents the small type, implementing Copy and allocated on stack. The wrapper tries to reduce contained values to this type whenever possible
__H(G)Represents the huge type, implementing Clone. To be used when values overflow T
Methods
impl<T, G> DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<T, G> DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, pub fn unpack(self) -> Result<T, G>[src]
pub fn unpack(self) -> Result<T, G>Unpacks the value
Utilises Result::Ok for S(small) numbers and Result::Err for __H(huge) ones
Examples
use fraction::dynaint::DynaInt; type D = DynaInt<u8, u16>; assert_eq!(Ok(1u8), D::from(1u8).unpack()); assert_eq!(Err(256u16), D::from(256u16).unpack());
Trait Implementations
impl<T, G> GenericInteger for DynaInt<T, G> where
T: GenericInteger + Copy + Integer + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger + 'static, [src]
impl<T, G> GenericInteger for DynaInt<T, G> where
T: GenericInteger + Copy + Integer + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger + 'static, fn _0() -> Self[src]
fn _0() -> SelfReturns value 0 of the type
fn _1() -> Self[src]
fn _1() -> SelfReturns value 1 of the type
fn _10() -> Self[src]
fn _10() -> SelfReturns value 10 of the type
fn _0r() -> Option<&'static Self>[src]
fn _0r() -> Option<&'static Self>Returns Maybe of 0
fn _1r() -> Option<&'static Self>[src]
fn _1r() -> Option<&'static Self>Returns Maybe of 1
fn _10r() -> Option<&'static Self>[src]
fn _10r() -> Option<&'static Self>Returns Maybe of 10
fn get_signed_value(self) -> (Sign, Self)[src]
fn get_signed_value(self) -> (Sign, Self)Returns the sign and the value itself. Zero values must have [Sign::Plus] Read more
impl<T, G> PartialOrd<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + PartialOrd,
G: Clone + GenericInteger + PartialOrd, [src]
impl<T, G> PartialOrd<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + PartialOrd,
G: Clone + GenericInteger + PartialOrd, fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl<T, G> Ord for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Ord,
G: Clone + GenericInteger + Ord, [src]
impl<T, G> Ord for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Ord,
G: Clone + GenericInteger + Ord, fn cmp(&self, other: &Self) -> Ordering[src]
fn cmp(&self, other: &Self) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl<T, G> PartialEq<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + PartialEq,
G: Clone + GenericInteger + PartialEq, [src]
impl<T, G> PartialEq<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + PartialEq,
G: Clone + GenericInteger + PartialEq, fn eq(&self, other: &Self) -> bool[src]
fn eq(&self, other: &Self) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl<T, G> From<u16> for DynaInt<T, G> where
u16: GenericInteger + PartialOrd + Into<G>,
T: GenericInteger + Copy + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<T, G> From<u16> for DynaInt<T, G> where
u16: GenericInteger + PartialOrd + Into<G>,
T: GenericInteger + Copy + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, impl<T, G> From<u32> for DynaInt<T, G> where
u32: GenericInteger + PartialOrd + Into<G>,
T: GenericInteger + Copy + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<T, G> From<u32> for DynaInt<T, G> where
u32: GenericInteger + PartialOrd + Into<G>,
T: GenericInteger + Copy + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, impl<T, G> From<u64> for DynaInt<T, G> where
u64: GenericInteger + PartialOrd + Into<G>,
T: GenericInteger + Copy + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<T, G> From<u64> for DynaInt<T, G> where
u64: GenericInteger + PartialOrd + Into<G>,
T: GenericInteger + Copy + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, impl<T, G> From<u128> for DynaInt<T, G> where
u128: GenericInteger + PartialOrd + Into<G>,
T: GenericInteger + Copy + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<T, G> From<u128> for DynaInt<T, G> where
u128: GenericInteger + PartialOrd + Into<G>,
T: GenericInteger + Copy + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, impl<T, G> From<usize> for DynaInt<T, G> where
usize: GenericInteger + PartialOrd + Into<G>,
T: GenericInteger + Copy + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<T, G> From<usize> for DynaInt<T, G> where
usize: GenericInteger + PartialOrd + Into<G>,
T: GenericInteger + Copy + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, impl<T, G> From<u8> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<T, G> From<u8> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, impl<T, G> From<BigUint> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger + From<BigUint>, [src]
impl<T, G> From<BigUint> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger + From<BigUint>, impl<T: Clone, G: Clone> Clone for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<T: Clone, G: Clone> Clone for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, fn clone(&self) -> DynaInt<T, G>[src]
fn clone(&self) -> DynaInt<T, G>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<T, G> Copy for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Copy + GenericInteger, [src]
impl<T, G> Copy for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Copy + GenericInteger, impl<T, G> Eq for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Eq,
G: Clone + GenericInteger + Eq, [src]
impl<T, G> Eq for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Eq,
G: Clone + GenericInteger + Eq, impl<T: Debug, G: Debug> Debug for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<T: Debug, G: Debug> Debug for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T, G> Display for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Display,
G: Clone + GenericInteger + Display, [src]
impl<T, G> Display for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Display,
G: Clone + GenericInteger + Display, fn fmt(&self, formatter: &mut Formatter) -> Result[src]
fn fmt(&self, formatter: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T, G> Sub<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Sub<Output = T> + CheckedSub,
G: Clone + GenericInteger + Sub<Output = G> + CheckedSub, [src]
impl<T, G> Sub<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Sub<Output = T> + CheckedSub,
G: Clone + GenericInteger + Sub<Output = G> + CheckedSub, type Output = Self
The resulting type after applying the - operator.
fn sub(self, other: Self) -> Self::Output[src]
fn sub(self, other: Self) -> Self::OutputPerforms the - operation.
impl<'a, T, G> Sub<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Sub<Output = T> + CheckedSub,
G: Clone + GenericInteger + Sub<Output = G> + CheckedSub,
&'a G: Sub<G, Output = G> + Sub<Output = G>, [src]
impl<'a, T, G> Sub<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Sub<Output = T> + CheckedSub,
G: Clone + GenericInteger + Sub<Output = G> + CheckedSub,
&'a G: Sub<G, Output = G> + Sub<Output = G>, type Output = DynaInt<T, G>
The resulting type after applying the - operator.
fn sub(self, other: Self) -> Self::Output[src]
fn sub(self, other: Self) -> Self::OutputPerforms the - operation.
impl<'a, T, G> Sub<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<'a, T, G> Sub<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, type Output = DynaInt<T, G>
The resulting type after applying the - operator.
fn sub(self, other: &'a Self) -> Self::Output[src]
fn sub(self, other: &'a Self) -> Self::OutputPerforms the - operation.
impl<T, G> Add<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Add<Output = T> + CheckedAdd,
G: Clone + GenericInteger + Add<Output = G> + CheckedAdd, [src]
impl<T, G> Add<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Add<Output = T> + CheckedAdd,
G: Clone + GenericInteger + Add<Output = G> + CheckedAdd, type Output = Self
The resulting type after applying the + operator.
fn add(self, other: Self) -> Self::Output[src]
fn add(self, other: Self) -> Self::OutputPerforms the + operation.
impl<'a, T, G> Add<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Add<Output = T> + CheckedAdd,
G: Clone + GenericInteger + Add<Output = G> + CheckedAdd,
&'a G: Add<G, Output = G> + Add<Output = G>, [src]
impl<'a, T, G> Add<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Add<Output = T> + CheckedAdd,
G: Clone + GenericInteger + Add<Output = G> + CheckedAdd,
&'a G: Add<G, Output = G> + Add<Output = G>, type Output = DynaInt<T, G>
The resulting type after applying the + operator.
fn add(self, other: Self) -> Self::Output[src]
fn add(self, other: Self) -> Self::OutputPerforms the + operation.
impl<'a, T, G> Add<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<'a, T, G> Add<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, type Output = DynaInt<T, G>
The resulting type after applying the + operator.
fn add(self, other: &'a Self) -> Self::Output[src]
fn add(self, other: &'a Self) -> Self::OutputPerforms the + operation.
impl<T, G> Mul<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Mul<Output = T> + CheckedMul,
G: Clone + GenericInteger + Mul<Output = G> + CheckedMul, [src]
impl<T, G> Mul<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Mul<Output = T> + CheckedMul,
G: Clone + GenericInteger + Mul<Output = G> + CheckedMul, type Output = Self
The resulting type after applying the * operator.
fn mul(self, other: Self) -> Self::Output[src]
fn mul(self, other: Self) -> Self::OutputPerforms the * operation.
impl<'a, T, G> Mul<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Mul<Output = T> + CheckedMul,
G: Clone + GenericInteger + Mul<Output = G> + CheckedMul,
&'a G: Mul<G, Output = G> + Mul<Output = G>, [src]
impl<'a, T, G> Mul<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Mul<Output = T> + CheckedMul,
G: Clone + GenericInteger + Mul<Output = G> + CheckedMul,
&'a G: Mul<G, Output = G> + Mul<Output = G>, type Output = DynaInt<T, G>
The resulting type after applying the * operator.
fn mul(self, other: Self) -> Self::Output[src]
fn mul(self, other: Self) -> Self::OutputPerforms the * operation.
impl<'a, T, G> Mul<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<'a, T, G> Mul<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, type Output = DynaInt<T, G>
The resulting type after applying the * operator.
fn mul(self, other: &'a Self) -> Self::Output[src]
fn mul(self, other: &'a Self) -> Self::OutputPerforms the * operation.
impl<T, G> Div<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Div<Output = T> + CheckedDiv,
G: Clone + GenericInteger + Div<Output = G> + CheckedDiv, [src]
impl<T, G> Div<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Div<Output = T> + CheckedDiv,
G: Clone + GenericInteger + Div<Output = G> + CheckedDiv, type Output = Self
The resulting type after applying the / operator.
fn div(self, other: Self) -> Self::Output[src]
fn div(self, other: Self) -> Self::OutputPerforms the / operation.
impl<'a, T, G> Div<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Div<Output = T> + CheckedDiv,
G: Clone + GenericInteger + Div<Output = G> + CheckedDiv,
&'a G: Div<G, Output = G> + Div<Output = G>, [src]
impl<'a, T, G> Div<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Div<Output = T> + CheckedDiv,
G: Clone + GenericInteger + Div<Output = G> + CheckedDiv,
&'a G: Div<G, Output = G> + Div<Output = G>, type Output = DynaInt<T, G>
The resulting type after applying the / operator.
fn div(self, other: Self) -> Self::Output[src]
fn div(self, other: Self) -> Self::OutputPerforms the / operation.
impl<'a, T, G> Div<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<'a, T, G> Div<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, type Output = DynaInt<T, G>
The resulting type after applying the / operator.
fn div(self, other: &'a Self) -> Self::Output[src]
fn div(self, other: &'a Self) -> Self::OutputPerforms the / operation.
impl<T, G> Rem<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Rem<Output = T>,
G: Clone + GenericInteger + Rem<Output = G>, [src]
impl<T, G> Rem<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Rem<Output = T>,
G: Clone + GenericInteger + Rem<Output = G>, type Output = Self
The resulting type after applying the % operator.
fn rem(self, other: Self) -> Self::Output[src]
fn rem(self, other: Self) -> Self::OutputPerforms the % operation.
impl<'a, T, G> Rem<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Rem<Output = T>,
G: Clone + GenericInteger + Rem<Output = G>,
&'a G: Rem<G, Output = G> + Rem<Output = G>, [src]
impl<'a, T, G> Rem<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Rem<Output = T>,
G: Clone + GenericInteger + Rem<Output = G>,
&'a G: Rem<G, Output = G> + Rem<Output = G>, type Output = DynaInt<T, G>
The resulting type after applying the % operator.
fn rem(self, other: Self) -> Self::Output[src]
fn rem(self, other: Self) -> Self::OutputPerforms the % operation.
impl<'a, T, G> Rem<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<'a, T, G> Rem<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, type Output = DynaInt<T, G>
The resulting type after applying the % operator.
fn rem(self, other: &'a Self) -> Self::Output[src]
fn rem(self, other: &'a Self) -> Self::OutputPerforms the % operation.
impl<T, G> Neg for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Neg<Output = T>,
G: Clone + GenericInteger + Neg<Output = G>, [src]
impl<T, G> Neg for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Neg<Output = T>,
G: Clone + GenericInteger + Neg<Output = G>, type Output = Self
The resulting type after applying the - operator.
fn neg(self) -> Self::Output[src]
fn neg(self) -> Self::OutputPerforms the unary - operation.
impl<T, G> AddAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + AddAssign + CheckedAdd,
G: Clone + GenericInteger + AddAssign + CheckedAdd, [src]
impl<T, G> AddAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + AddAssign + CheckedAdd,
G: Clone + GenericInteger + AddAssign + CheckedAdd, fn add_assign(&mut self, other: Self)[src]
fn add_assign(&mut self, other: Self)Performs the += operation.
impl<'a, T, G> AddAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + AddAssign + CheckedAdd,
G: Clone + GenericInteger + AddAssign + CheckedAdd, [src]
impl<'a, T, G> AddAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + AddAssign + CheckedAdd,
G: Clone + GenericInteger + AddAssign + CheckedAdd, fn add_assign(&mut self, other: &'a Self)[src]
fn add_assign(&mut self, other: &'a Self)Performs the += operation.
impl<T, G> SubAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + SubAssign + CheckedSub,
G: Clone + GenericInteger + SubAssign + CheckedSub, [src]
impl<T, G> SubAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + SubAssign + CheckedSub,
G: Clone + GenericInteger + SubAssign + CheckedSub, fn sub_assign(&mut self, other: Self)[src]
fn sub_assign(&mut self, other: Self)Performs the -= operation.
impl<'a, T, G> SubAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + SubAssign + CheckedSub,
G: Clone + GenericInteger + SubAssign + CheckedSub, [src]
impl<'a, T, G> SubAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + SubAssign + CheckedSub,
G: Clone + GenericInteger + SubAssign + CheckedSub, fn sub_assign(&mut self, other: &'a Self)[src]
fn sub_assign(&mut self, other: &'a Self)Performs the -= operation.
impl<T, G> MulAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + MulAssign + CheckedMul,
G: Clone + GenericInteger + MulAssign + CheckedMul, [src]
impl<T, G> MulAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + MulAssign + CheckedMul,
G: Clone + GenericInteger + MulAssign + CheckedMul, fn mul_assign(&mut self, other: Self)[src]
fn mul_assign(&mut self, other: Self)Performs the *= operation.
impl<'a, T, G> MulAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + MulAssign + CheckedMul,
G: Clone + GenericInteger + MulAssign + CheckedMul, [src]
impl<'a, T, G> MulAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + MulAssign + CheckedMul,
G: Clone + GenericInteger + MulAssign + CheckedMul, fn mul_assign(&mut self, other: &'a Self)[src]
fn mul_assign(&mut self, other: &'a Self)Performs the *= operation.
impl<T, G> DivAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + DivAssign + CheckedDiv,
G: Clone + GenericInteger + DivAssign + CheckedDiv, [src]
impl<T, G> DivAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + DivAssign + CheckedDiv,
G: Clone + GenericInteger + DivAssign + CheckedDiv, fn div_assign(&mut self, other: Self)[src]
fn div_assign(&mut self, other: Self)Performs the /= operation.
impl<'a, T, G> DivAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + DivAssign + CheckedDiv,
G: Clone + GenericInteger + DivAssign + CheckedDiv, [src]
impl<'a, T, G> DivAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + DivAssign + CheckedDiv,
G: Clone + GenericInteger + DivAssign + CheckedDiv, fn div_assign(&mut self, other: &'a Self)[src]
fn div_assign(&mut self, other: &'a Self)Performs the /= operation.
impl<T, G> RemAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + RemAssign,
G: Clone + GenericInteger + RemAssign, [src]
impl<T, G> RemAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + RemAssign,
G: Clone + GenericInteger + RemAssign, fn rem_assign(&mut self, other: Self)[src]
fn rem_assign(&mut self, other: Self)Performs the %= operation.
impl<'a, T, G> RemAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<'a, T, G> RemAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, fn rem_assign(&mut self, other: &'a Self)[src]
fn rem_assign(&mut self, other: &'a Self)Performs the %= operation.
impl<T, G> Not for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Not<Output = T>,
G: Clone + GenericInteger + Not<Output = G>, [src]
impl<T, G> Not for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Not<Output = T>,
G: Clone + GenericInteger + Not<Output = G>, type Output = Self
The resulting type after applying the ! operator.
fn not(self) -> Self::Output[src]
fn not(self) -> Self::OutputPerforms the unary ! operation.
impl<T, G> BitAnd<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitAnd<Output = T>,
G: Clone + GenericInteger + BitAnd<Output = G>, [src]
impl<T, G> BitAnd<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitAnd<Output = T>,
G: Clone + GenericInteger + BitAnd<Output = G>, type Output = Self
The resulting type after applying the & operator.
fn bitand(self, other: Self) -> Self::Output[src]
fn bitand(self, other: Self) -> Self::OutputPerforms the & operation.
impl<'a, T, G> BitAnd<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitAnd<Output = T>,
G: Clone + GenericInteger + BitAnd<Output = G> + BitAnd<&'a G, Output = G>,
&'a G: BitAnd<G, Output = G> + BitAnd<Output = G>, [src]
impl<'a, T, G> BitAnd<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitAnd<Output = T>,
G: Clone + GenericInteger + BitAnd<Output = G> + BitAnd<&'a G, Output = G>,
&'a G: BitAnd<G, Output = G> + BitAnd<Output = G>, type Output = DynaInt<T, G>
The resulting type after applying the & operator.
fn bitand(self, other: Self) -> Self::Output[src]
fn bitand(self, other: Self) -> Self::OutputPerforms the & operation.
impl<T, G> BitOr<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitOr<Output = T>,
G: Clone + GenericInteger + BitOr<Output = G>, [src]
impl<T, G> BitOr<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitOr<Output = T>,
G: Clone + GenericInteger + BitOr<Output = G>, type Output = Self
The resulting type after applying the | operator.
fn bitor(self, other: Self) -> Self::Output[src]
fn bitor(self, other: Self) -> Self::OutputPerforms the | operation.
impl<'a, T, G> BitOr<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitOr<Output = T>,
G: Clone + GenericInteger + BitOr<Output = G> + BitOr<&'a G, Output = G>,
&'a G: BitOr<G, Output = G> + BitOr<Output = G>, [src]
impl<'a, T, G> BitOr<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitOr<Output = T>,
G: Clone + GenericInteger + BitOr<Output = G> + BitOr<&'a G, Output = G>,
&'a G: BitOr<G, Output = G> + BitOr<Output = G>, type Output = DynaInt<T, G>
The resulting type after applying the | operator.
fn bitor(self, other: Self) -> Self::Output[src]
fn bitor(self, other: Self) -> Self::OutputPerforms the | operation.
impl<T, G> BitXor<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitXor<Output = T>,
G: Clone + GenericInteger + BitXor<Output = G>, [src]
impl<T, G> BitXor<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitXor<Output = T>,
G: Clone + GenericInteger + BitXor<Output = G>, type Output = Self
The resulting type after applying the ^ operator.
fn bitxor(self, other: Self) -> Self::Output[src]
fn bitxor(self, other: Self) -> Self::OutputPerforms the ^ operation.
impl<'a, T, G> BitXor<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitXor<Output = T>,
G: Clone + GenericInteger + BitXor<Output = G> + BitXor<&'a G, Output = G>,
&'a G: BitXor<G, Output = G> + BitXor<Output = G>, [src]
impl<'a, T, G> BitXor<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitXor<Output = T>,
G: Clone + GenericInteger + BitXor<Output = G> + BitXor<&'a G, Output = G>,
&'a G: BitXor<G, Output = G> + BitXor<Output = G>, type Output = DynaInt<T, G>
The resulting type after applying the ^ operator.
fn bitxor(self, other: Self) -> Self::Output[src]
fn bitxor(self, other: Self) -> Self::OutputPerforms the ^ operation.
impl<T, G> Shl<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Shl<Output = T>,
G: Clone + GenericInteger + Shl<Output = G>, [src]
impl<T, G> Shl<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Shl<Output = T>,
G: Clone + GenericInteger + Shl<Output = G>, type Output = Self
The resulting type after applying the << operator.
fn shl(self, other: Self) -> Self::Output[src]
fn shl(self, other: Self) -> Self::OutputPerforms the << operation.
impl<'a, T, G> Shl<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Shl<Output = T>,
G: Clone + GenericInteger + Shl<Output = G> + Shl<&'a G, Output = G>,
&'a G: Shl<G, Output = G> + Shl<Output = G>, [src]
impl<'a, T, G> Shl<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Shl<Output = T>,
G: Clone + GenericInteger + Shl<Output = G> + Shl<&'a G, Output = G>,
&'a G: Shl<G, Output = G> + Shl<Output = G>, type Output = DynaInt<T, G>
The resulting type after applying the << operator.
fn shl(self, other: Self) -> Self::Output[src]
fn shl(self, other: Self) -> Self::OutputPerforms the << operation.
impl<T, G> Shr<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Shr<Output = T>,
G: Clone + GenericInteger + Shr<Output = G>, [src]
impl<T, G> Shr<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Shr<Output = T>,
G: Clone + GenericInteger + Shr<Output = G>, type Output = Self
The resulting type after applying the >> operator.
fn shr(self, other: Self) -> Self::Output[src]
fn shr(self, other: Self) -> Self::OutputPerforms the >> operation.
impl<'a, T, G> Shr<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Shr<Output = T>,
G: Clone + GenericInteger + Shr<Output = G> + Shr<&'a G, Output = G>,
&'a G: Shr<G, Output = G> + Shr<Output = G>, [src]
impl<'a, T, G> Shr<&'a DynaInt<T, G>> for &'a DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Shr<Output = T>,
G: Clone + GenericInteger + Shr<Output = G> + Shr<&'a G, Output = G>,
&'a G: Shr<G, Output = G> + Shr<Output = G>, type Output = DynaInt<T, G>
The resulting type after applying the >> operator.
fn shr(self, other: Self) -> Self::Output[src]
fn shr(self, other: Self) -> Self::OutputPerforms the >> operation.
impl<T, G> BitAndAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitAndAssign,
G: Clone + GenericInteger + BitAndAssign, [src]
impl<T, G> BitAndAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitAndAssign,
G: Clone + GenericInteger + BitAndAssign, fn bitand_assign(&mut self, other: Self)[src]
fn bitand_assign(&mut self, other: Self)Performs the &= operation.
impl<'a, T, G> BitAndAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitAndAssign<&'a T>,
G: Clone + GenericInteger + BitAndAssign<&'a G> + BitAndAssign<G>, [src]
impl<'a, T, G> BitAndAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitAndAssign<&'a T>,
G: Clone + GenericInteger + BitAndAssign<&'a G> + BitAndAssign<G>, fn bitand_assign(&mut self, other: &'a Self)[src]
fn bitand_assign(&mut self, other: &'a Self)Performs the &= operation.
impl<T, G> BitOrAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitOrAssign,
G: Clone + GenericInteger + BitOrAssign, [src]
impl<T, G> BitOrAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitOrAssign,
G: Clone + GenericInteger + BitOrAssign, fn bitor_assign(&mut self, other: Self)[src]
fn bitor_assign(&mut self, other: Self)Performs the |= operation.
impl<'a, T, G> BitOrAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitOrAssign<&'a T>,
G: Clone + GenericInteger + BitOrAssign<&'a G> + BitOrAssign<G>, [src]
impl<'a, T, G> BitOrAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitOrAssign<&'a T>,
G: Clone + GenericInteger + BitOrAssign<&'a G> + BitOrAssign<G>, fn bitor_assign(&mut self, other: &'a Self)[src]
fn bitor_assign(&mut self, other: &'a Self)Performs the |= operation.
impl<T, G> BitXorAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitXorAssign,
G: Clone + GenericInteger + BitXorAssign, [src]
impl<T, G> BitXorAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitXorAssign,
G: Clone + GenericInteger + BitXorAssign, fn bitxor_assign(&mut self, other: Self)[src]
fn bitxor_assign(&mut self, other: Self)Performs the ^= operation.
impl<'a, T, G> BitXorAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitXorAssign<&'a T>,
G: Clone + GenericInteger + BitXorAssign<&'a G> + BitXorAssign<G>, [src]
impl<'a, T, G> BitXorAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitXorAssign<&'a T>,
G: Clone + GenericInteger + BitXorAssign<&'a G> + BitXorAssign<G>, fn bitxor_assign(&mut self, other: &'a Self)[src]
fn bitxor_assign(&mut self, other: &'a Self)Performs the ^= operation.
impl<T, G> ShlAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + ShlAssign,
G: Clone + GenericInteger + ShlAssign, [src]
impl<T, G> ShlAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + ShlAssign,
G: Clone + GenericInteger + ShlAssign, fn shl_assign(&mut self, other: Self)[src]
fn shl_assign(&mut self, other: Self)Performs the <<= operation.
impl<'a, T, G> ShlAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + ShlAssign<&'a T>,
G: Clone + GenericInteger + ShlAssign<&'a G> + ShlAssign<G>, [src]
impl<'a, T, G> ShlAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + ShlAssign<&'a T>,
G: Clone + GenericInteger + ShlAssign<&'a G> + ShlAssign<G>, fn shl_assign(&mut self, other: &'a Self)[src]
fn shl_assign(&mut self, other: &'a Self)Performs the <<= operation.
impl<T, G> ShrAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + ShrAssign,
G: Clone + GenericInteger + ShrAssign, [src]
impl<T, G> ShrAssign<DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + ShrAssign,
G: Clone + GenericInteger + ShrAssign, fn shr_assign(&mut self, other: Self)[src]
fn shr_assign(&mut self, other: Self)Performs the >>= operation.
impl<'a, T, G> ShrAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + ShrAssign<&'a T>,
G: Clone + GenericInteger + ShrAssign<&'a G> + ShrAssign<G>, [src]
impl<'a, T, G> ShrAssign<&'a DynaInt<T, G>> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + ShrAssign<&'a T>,
G: Clone + GenericInteger + ShrAssign<&'a G> + ShrAssign<G>, fn shr_assign(&mut self, other: &'a Self)[src]
fn shr_assign(&mut self, other: &'a Self)Performs the >>= operation.
impl<T, G> Integer for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<T, G> Integer for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, fn div_floor(&self, other: &Self) -> Self[src]
fn div_floor(&self, other: &Self) -> SelfFloored integer division. Read more
fn mod_floor(&self, other: &Self) -> Self[src]
fn mod_floor(&self, other: &Self) -> SelfFloored integer modulo, satisfying: Read more
fn gcd(&self, other: &Self) -> Self[src]
fn gcd(&self, other: &Self) -> SelfGreatest Common Divisor (GCD). Read more
fn lcm(&self, other: &Self) -> Self[src]
fn lcm(&self, other: &Self) -> SelfLowest Common Multiple (LCM). Read more
fn divides(&self, other: &Self) -> bool[src]
fn divides(&self, other: &Self) -> boolDeprecated, use is_multiple_of instead.
fn is_multiple_of(&self, other: &Self) -> bool[src]
fn is_multiple_of(&self, other: &Self) -> boolReturns true if self is a multiple of other. Read more
fn is_even(&self) -> bool[src]
fn is_even(&self) -> boolReturns true if the number is even. Read more
fn is_odd(&self) -> bool[src]
fn is_odd(&self) -> boolReturns true if the number is odd. Read more
fn div_rem(&self, other: &Self) -> (Self, Self)[src]
fn div_rem(&self, other: &Self) -> (Self, Self)Simultaneous truncated integer division and modulus. Returns (quotient, remainder). Read more
fn div_mod_floor(&self, other: &Self) -> (Self, Self)[src]
fn div_mod_floor(&self, other: &Self) -> (Self, Self)Simultaneous floored integer division and modulus. Returns (quotient, remainder). Read more
impl<T, G> ToPrimitive for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + ToPrimitive,
G: Clone + GenericInteger, [src]
impl<T, G> ToPrimitive for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + ToPrimitive,
G: Clone + GenericInteger, fn to_i64(&self) -> Option<i64>[src]
fn to_i64(&self) -> Option<i64>Converts the value of self to an i64.
fn to_u64(&self) -> Option<u64>[src]
fn to_u64(&self) -> Option<u64>Converts the value of self to an u64.
fn to_isize(&self) -> Option<isize>[src]
fn to_isize(&self) -> Option<isize>Converts the value of self to an isize.
fn to_i8(&self) -> Option<i8>[src]
fn to_i8(&self) -> Option<i8>Converts the value of self to an i8.
fn to_i16(&self) -> Option<i16>[src]
fn to_i16(&self) -> Option<i16>Converts the value of self to an i16.
fn to_i32(&self) -> Option<i32>[src]
fn to_i32(&self) -> Option<i32>Converts the value of self to an i32.
fn to_i128(&self) -> Option<i128>[src]
fn to_i128(&self) -> Option<i128>Converts the value of self to an i128. Read more
fn to_usize(&self) -> Option<usize>[src]
fn to_usize(&self) -> Option<usize>Converts the value of self to a usize.
fn to_u8(&self) -> Option<u8>[src]
fn to_u8(&self) -> Option<u8>Converts the value of self to an u8.
fn to_u16(&self) -> Option<u16>[src]
fn to_u16(&self) -> Option<u16>Converts the value of self to an u16.
fn to_u32(&self) -> Option<u32>[src]
fn to_u32(&self) -> Option<u32>Converts the value of self to an u32.
fn to_u128(&self) -> Option<u128>[src]
fn to_u128(&self) -> Option<u128>Converts the value of self to an u128. Read more
fn to_f32(&self) -> Option<f32>[src]
fn to_f32(&self) -> Option<f32>Converts the value of self to an f32.
fn to_f64(&self) -> Option<f64>[src]
fn to_f64(&self) -> Option<f64>Converts the value of self to an f64.
impl<T, G> Num for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Num,
G: Clone + GenericInteger, [src]
impl<T, G> Num for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Num,
G: Clone + GenericInteger, type FromStrRadixErr = <G as Num>::FromStrRadixErr
fn from_str_radix(s: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>[src]
fn from_str_radix(s: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>Convert from a string and radix <= 36. Read more
impl<T, G> Bounded for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Bounded,
G: Clone + GenericInteger + Bounded, [src]
impl<T, G> Bounded for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Bounded,
G: Clone + GenericInteger + Bounded, fn min_value() -> Self[src]
fn min_value() -> Selfreturns the smallest finite number this type can represent
fn max_value() -> Self[src]
fn max_value() -> Selfreturns the largest finite number this type can represent
impl<T, G> Zero for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<T, G> Zero for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, fn zero() -> Self[src]
fn zero() -> SelfReturns the additive identity element of Self, 0. Read more
fn is_zero(&self) -> bool[src]
fn is_zero(&self) -> boolReturns true if self is equal to the additive identity.
impl<T, G> One for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, [src]
impl<T, G> One for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger, fn one() -> Self[src]
fn one() -> SelfReturns the multiplicative identity element of Self, 1. Read more
fn is_one(&self) -> bool where
Self: PartialEq<Self>, [src]
fn is_one(&self) -> bool where
Self: PartialEq<Self>, Returns true if self is equal to the multiplicative identity. Read more
impl<T, G> CheckedSub for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + CheckedSub,
G: Clone + GenericInteger + CheckedSub, [src]
impl<T, G> CheckedSub for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + CheckedSub,
G: Clone + GenericInteger + CheckedSub, fn checked_sub(&self, other: &Self) -> Option<Self>[src]
fn checked_sub(&self, other: &Self) -> Option<Self>Subtracts two numbers, checking for underflow. If underflow happens, None is returned. Read more
impl<T, G> CheckedAdd for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + CheckedAdd,
G: Clone + GenericInteger + CheckedAdd, [src]
impl<T, G> CheckedAdd for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + CheckedAdd,
G: Clone + GenericInteger + CheckedAdd, fn checked_add(&self, other: &Self) -> Option<Self>[src]
fn checked_add(&self, other: &Self) -> Option<Self>Adds two numbers, checking for overflow. If overflow happens, None is returned. Read more
impl<T, G> CheckedMul for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + CheckedMul,
G: Clone + GenericInteger + CheckedMul, [src]
impl<T, G> CheckedMul for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + CheckedMul,
G: Clone + GenericInteger + CheckedMul, fn checked_mul(&self, other: &Self) -> Option<Self>[src]
fn checked_mul(&self, other: &Self) -> Option<Self>Multiplies two numbers, checking for underflow or overflow. If underflow or overflow happens, None is returned. Read more
impl<T, G> CheckedDiv for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + CheckedDiv,
G: Clone + GenericInteger + CheckedDiv, [src]
impl<T, G> CheckedDiv for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + CheckedDiv,
G: Clone + GenericInteger + CheckedDiv, fn checked_div(&self, other: &Self) -> Option<Self>[src]
fn checked_div(&self, other: &Self) -> Option<Self>Divides two numbers, checking for underflow, overflow and division by zero. If any of that happens, None is returned. Read more
Auto Trait Implementations
impl<T, G> Send for DynaInt<T, G> where
G: Send,
T: Send,
impl<T, G> Send for DynaInt<T, G> where
G: Send,
T: Send, impl<T, G> Sync for DynaInt<T, G> where
G: Sync,
T: Sync,
impl<T, G> Sync for DynaInt<T, G> where
G: Sync,
T: Sync, Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> ToString for T where
T: Display + ?Sized, [src]
impl<T> ToString for T where
T: Display + ?Sized, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, type Owned = T
fn to_owned(&self) -> T[src]
fn to_owned(&self) -> TCreates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)[src]
fn clone_into(&self, target: &mut T)🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T[src]
impl<T> From for Timpl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more
impl<T> NumRef for T where
T: Num + NumOps<&'r T, T>, [src]
impl<T> NumRef for T where
T: Num + NumOps<&'r T, T>, impl<T, Rhs, Output> NumOps for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, [src]
impl<T, Rhs, Output> NumOps for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, impl<T, Base> RefNum for T where
T: NumOps<Base, Base> + NumOps<&'r Base, Base>, [src]
impl<T, Base> RefNum for T where
T: NumOps<Base, Base> + NumOps<&'r Base, Base>, impl<T> NumAssign for T where
T: Num + NumAssignOps<T>, [src]
impl<T> NumAssign for T where
T: Num + NumAssignOps<T>, impl<T, Rhs> NumAssignOps for T where
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, [src]
impl<T, Rhs> NumAssignOps for T where
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, impl<T> NumAssignRef for T where
T: NumAssign + NumAssignOps<&'r T>, [src]
impl<T> NumAssignRef for T where
T: NumAssign + NumAssignOps<&'r T>, impl<Q, K> Equivalent for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
impl<Q, K> Equivalent for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, fn equivalent(&self, key: &K) -> bool[src]
fn equivalent(&self, key: &K) -> boolCompare self to key and return true if they are equal.
impl<T> Same for T
impl<T> Same for Ttype Output = T
Should always be Self