[−][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
Represents the small type, implementing Copy and allocated on stack. The wrapper tries to reduce contained values to this type whenever possible
Represents the huge type, implementing Clone. To be used when values overflow T
Implementations
impl<T, G> DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
pub fn unpack(self) -> Result<T, G>
[src]
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<'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]
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.
pub fn add(self, other: Self) -> Self::Output
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
type Output = DynaInt<T, G>
The resulting type after applying the +
operator.
pub fn add(self, other: &'a Self) -> Self::Output
[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,
[src]
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.
pub fn add(self, other: Self) -> Self::Output
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + AddAssign + CheckedAdd,
G: Clone + GenericInteger + AddAssign + CheckedAdd,
pub fn add_assign(&mut self, other: &'a Self)
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + AddAssign + CheckedAdd,
G: Clone + GenericInteger + AddAssign + CheckedAdd,
pub fn add_assign(&mut self, other: Self)
[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>,
[src]
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.
pub fn bitand(self, other: Self) -> Self::Output
[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>,
[src]
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.
pub fn bitand(self, other: Self) -> Self::Output
[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>,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitAndAssign<&'a T>,
G: Clone + GenericInteger + BitAndAssign<&'a G> + BitAndAssign<G>,
pub fn bitand_assign(&mut self, other: &'a Self)
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitAndAssign,
G: Clone + GenericInteger + BitAndAssign,
pub fn bitand_assign(&mut self, other: Self)
[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>,
[src]
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.
pub fn bitor(self, other: Self) -> Self::Output
[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>,
[src]
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.
pub fn bitor(self, other: Self) -> Self::Output
[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>,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitOrAssign<&'a T>,
G: Clone + GenericInteger + BitOrAssign<&'a G> + BitOrAssign<G>,
pub fn bitor_assign(&mut self, other: &'a Self)
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitOrAssign,
G: Clone + GenericInteger + BitOrAssign,
pub fn bitor_assign(&mut self, other: Self)
[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>,
[src]
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.
pub fn bitxor(self, other: Self) -> Self::Output
[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>,
[src]
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.
pub fn bitxor(self, other: Self) -> Self::Output
[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>,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitXorAssign<&'a T>,
G: Clone + GenericInteger + BitXorAssign<&'a G> + BitXorAssign<G>,
pub fn bitxor_assign(&mut self, other: &'a Self)
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + BitXorAssign,
G: Clone + GenericInteger + BitXorAssign,
pub fn bitxor_assign(&mut self, other: Self)
[src]
impl<T, G> Bounded for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Bounded,
G: Clone + GenericInteger + Bounded,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Bounded,
G: Clone + GenericInteger + Bounded,
impl<T, G> CheckedAdd for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + CheckedAdd,
G: Clone + GenericInteger + CheckedAdd,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + CheckedAdd,
G: Clone + GenericInteger + CheckedAdd,
pub fn checked_add(&self, other: &Self) -> Option<Self>
[src]
impl<T, G> CheckedDiv for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + CheckedDiv,
G: Clone + GenericInteger + CheckedDiv,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + CheckedDiv,
G: Clone + GenericInteger + CheckedDiv,
pub fn checked_div(&self, other: &Self) -> Option<Self>
[src]
impl<T, G> CheckedMul for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + CheckedMul,
G: Clone + GenericInteger + CheckedMul,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + CheckedMul,
G: Clone + GenericInteger + CheckedMul,
pub fn checked_mul(&self, other: &Self) -> Option<Self>
[src]
impl<T, G> CheckedSub for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + CheckedSub,
G: Clone + GenericInteger + CheckedSub,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + CheckedSub,
G: Clone + GenericInteger + CheckedSub,
pub fn checked_sub(&self, other: &Self) -> Option<Self>
[src]
impl<T: Clone, G: Clone> Clone for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
impl<T, G> Copy for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Copy + GenericInteger,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Copy + GenericInteger,
impl<T: Debug, G: Debug> Debug for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
impl<T, G> Display for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Display,
G: Clone + GenericInteger + Display,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Display,
G: Clone + GenericInteger + Display,
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]
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.
pub fn div(self, other: Self) -> Self::Output
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
type Output = DynaInt<T, G>
The resulting type after applying the /
operator.
pub fn div(self, other: &'a Self) -> Self::Output
[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,
[src]
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.
pub fn div(self, other: Self) -> Self::Output
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + DivAssign + CheckedDiv,
G: Clone + GenericInteger + DivAssign + CheckedDiv,
pub fn div_assign(&mut self, other: &'a Self)
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + DivAssign + CheckedDiv,
G: Clone + GenericInteger + DivAssign + CheckedDiv,
pub fn div_assign(&mut self, other: Self)
[src]
impl<T, G> Eq for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Eq,
G: Clone + GenericInteger + Eq,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Eq,
G: Clone + GenericInteger + Eq,
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]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger + From<BigUint>,
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]
u128: GenericInteger + PartialOrd + Into<G>,
T: GenericInteger + Copy + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
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]
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]
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]
u64: 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]
T: Copy + GenericInteger + 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]
usize: GenericInteger + PartialOrd + Into<G>,
T: GenericInteger + Copy + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
impl<T, G> GenericInteger for DynaInt<T, G> where
T: GenericInteger + Copy + Integer + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger + 'static,
[src]
T: GenericInteger + Copy + Integer + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger + 'static,
pub fn _0() -> Self
[src]
pub fn _1() -> Self
[src]
pub fn _10() -> Self
[src]
pub fn _0r() -> Option<&'static Self>
[src]
pub fn _1r() -> Option<&'static Self>
[src]
pub fn _10r() -> Option<&'static Self>
[src]
pub fn get_signed_value(self) -> (Sign, Self)
[src]
impl<T, G> Integer for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
pub fn div_floor(&self, other: &Self) -> Self
[src]
pub fn mod_floor(&self, other: &Self) -> Self
[src]
pub fn gcd(&self, other: &Self) -> Self
[src]
pub fn lcm(&self, other: &Self) -> Self
[src]
pub fn divides(&self, other: &Self) -> bool
[src]
pub fn is_multiple_of(&self, other: &Self) -> bool
[src]
pub fn is_even(&self) -> bool
[src]
pub fn is_odd(&self) -> bool
[src]
pub fn div_rem(&self, other: &Self) -> (Self, Self)
[src]
pub fn div_ceil(&self, other: &Self) -> Self
[src]
pub fn gcd_lcm(&self, other: &Self) -> (Self, Self)
[src]
pub fn extended_gcd(&self, other: &Self) -> ExtendedGcd<Self> where
Self: Clone,
[src]
Self: Clone,
pub fn extended_gcd_lcm(&self, other: &Self) -> (ExtendedGcd<Self>, Self) where
Self: Clone + Signed,
[src]
Self: Clone + Signed,
pub fn div_mod_floor(&self, other: &Self) -> (Self, Self)
[src]
pub fn next_multiple_of(&self, other: &Self) -> Self where
Self: Clone,
[src]
Self: Clone,
pub fn prev_multiple_of(&self, other: &Self) -> Self where
Self: Clone,
[src]
Self: Clone,
impl<T, G> Into<BigUint> for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger + Into<BigUint>,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger + Into<BigUint>,
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]
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.
pub fn mul(self, other: Self) -> Self::Output
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
type Output = DynaInt<T, G>
The resulting type after applying the *
operator.
pub fn mul(self, other: &'a Self) -> Self::Output
[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,
[src]
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.
pub fn mul(self, other: Self) -> Self::Output
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + MulAssign + CheckedMul,
G: Clone + GenericInteger + MulAssign + CheckedMul,
pub fn mul_assign(&mut self, other: &'a Self)
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + MulAssign + CheckedMul,
G: Clone + GenericInteger + MulAssign + CheckedMul,
pub fn mul_assign(&mut self, other: Self)
[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>,
[src]
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.
pub fn neg(self) -> Self::Output
[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>,
[src]
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.
pub fn not(self) -> Self::Output
[src]
impl<T, G> Num for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Num,
G: Clone + GenericInteger,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Num,
G: Clone + GenericInteger,
type FromStrRadixErr = <G as Num>::FromStrRadixErr
pub fn from_str_radix(
s: &str,
radix: u32
) -> Result<Self, Self::FromStrRadixErr>
[src]
s: &str,
radix: u32
) -> Result<Self, Self::FromStrRadixErr>
impl<T, G> One for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
pub fn one() -> Self
[src]
pub fn set_one(&mut self)
[src]
pub fn is_one(&self) -> bool where
Self: PartialEq<Self>,
[src]
Self: PartialEq<Self>,
impl<T, G> Ord for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Ord,
G: Clone + GenericInteger + Ord,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + Ord,
G: Clone + GenericInteger + Ord,
pub fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + PartialEq,
G: Clone + GenericInteger + PartialEq,
pub fn eq(&self, other: &Self) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + PartialOrd,
G: Clone + GenericInteger + PartialOrd,
pub fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[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>,
[src]
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.
pub fn rem(self, other: Self) -> Self::Output
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
type Output = DynaInt<T, G>
The resulting type after applying the %
operator.
pub fn rem(self, other: &'a Self) -> Self::Output
[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>,
[src]
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.
pub fn rem(self, other: Self) -> Self::Output
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
pub fn rem_assign(&mut self, other: &'a Self)
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + RemAssign,
G: Clone + GenericInteger + RemAssign,
pub fn rem_assign(&mut self, other: Self)
[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>,
[src]
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.
pub fn shl(self, other: Self) -> Self::Output
[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>,
[src]
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.
pub fn shl(self, other: Self) -> Self::Output
[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>,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + ShlAssign<&'a T>,
G: Clone + GenericInteger + ShlAssign<&'a G> + ShlAssign<G>,
pub fn shl_assign(&mut self, other: &'a Self)
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + ShlAssign,
G: Clone + GenericInteger + ShlAssign,
pub fn shl_assign(&mut self, other: Self)
[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>,
[src]
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.
pub fn shr(self, other: Self) -> Self::Output
[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>,
[src]
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.
pub fn shr(self, other: Self) -> Self::Output
[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>,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + ShrAssign<&'a T>,
G: Clone + GenericInteger + ShrAssign<&'a G> + ShrAssign<G>,
pub fn shr_assign(&mut self, other: &'a Self)
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + ShrAssign,
G: Clone + GenericInteger + ShrAssign,
pub fn shr_assign(&mut self, other: Self)
[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>,
[src]
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.
pub fn sub(self, other: Self) -> Self::Output
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
type Output = DynaInt<T, G>
The resulting type after applying the -
operator.
pub fn sub(self, other: &'a Self) -> Self::Output
[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,
[src]
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.
pub fn sub(self, other: Self) -> Self::Output
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + SubAssign + CheckedSub,
G: Clone + GenericInteger + SubAssign + CheckedSub,
pub fn sub_assign(&mut self, other: &'a Self)
[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,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + SubAssign + CheckedSub,
G: Clone + GenericInteger + SubAssign + CheckedSub,
pub fn sub_assign(&mut self, other: Self)
[src]
impl<T, G> ToPrimitive for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + ToPrimitive,
G: Clone + GenericInteger,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8> + ToPrimitive,
G: Clone + GenericInteger,
pub fn to_i64(&self) -> Option<i64>
[src]
pub fn to_u64(&self) -> Option<u64>
[src]
pub fn to_isize(&self) -> Option<isize>
[src]
pub fn to_i8(&self) -> Option<i8>
[src]
pub fn to_i16(&self) -> Option<i16>
[src]
pub fn to_i32(&self) -> Option<i32>
[src]
pub fn to_i128(&self) -> Option<i128>
[src]
pub fn to_usize(&self) -> Option<usize>
[src]
pub fn to_u8(&self) -> Option<u8>
[src]
pub fn to_u16(&self) -> Option<u16>
[src]
pub fn to_u32(&self) -> Option<u32>
[src]
pub fn to_u128(&self) -> Option<u128>
[src]
pub fn to_f32(&self) -> Option<f32>
[src]
pub fn to_f64(&self) -> Option<f64>
[src]
impl<T, G> Zero for DynaInt<T, G> where
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
[src]
T: Copy + GenericInteger + Into<G> + TryToConvertFrom<G> + From<u8>,
G: Clone + GenericInteger,
Auto Trait Implementations
impl<T, G> RefUnwindSafe for DynaInt<T, G> where
G: RefUnwindSafe,
T: RefUnwindSafe,
[src]
G: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, G> Send for DynaInt<T, G> where
G: Send,
T: Send,
[src]
G: Send,
T: Send,
impl<T, G> Sync for DynaInt<T, G> where
G: Sync,
T: Sync,
[src]
G: Sync,
T: Sync,
impl<T, G> Unpin for DynaInt<T, G> where
G: Unpin,
T: Unpin,
[src]
G: Unpin,
T: Unpin,
impl<T, G> UnwindSafe for DynaInt<T, G> where
G: UnwindSafe,
T: UnwindSafe,
[src]
G: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> NumAssign for T where
T: Num + NumAssignOps<T>,
[src]
T: Num + NumAssignOps<T>,
impl<T, Rhs> NumAssignOps<Rhs> for T where
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
[src]
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
impl<T> NumAssignRef for T where
T: NumAssign + for<'r> NumAssignOps<&'r T>,
[src]
T: NumAssign + for<'r> NumAssignOps<&'r T>,
impl<T, Rhs, Output> NumOps<Rhs, Output> 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]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
impl<T> NumRef for T where
T: Num + for<'r> NumOps<&'r T, T>,
[src]
T: Num + for<'r> NumOps<&'r T, T>,
impl<T, Base> RefNum<Base> for T where
T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,
[src]
T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,