[−][src]Struct modtype::ModType
A modular arithmetic integer type which modulus is a constant.
Examples
use modtype::{use_modtype, DefaultModType}; use num::bigint::{Sign, ToBigInt as _, ToBigUint as _}; use num::pow::Pow as _; use num::traits::{CheckedNeg as _, CheckedRem as _, Inv as _}; use num::{ BigInt, BigUint, Bounded as _, CheckedAdd as _, CheckedDiv as _, CheckedMul as _, CheckedSub as _, FromPrimitive as _, Num as _, One as _, ToPrimitive as _, Unsigned, Zero as _, }; #[use_modtype] type F = DefaultModType<7u32>; fn static_assert_unsigned<T: Unsigned>() {} // Constructor, `new`, `new_unchecked`, `get` assert_eq!(F::new(8), F(1)); assert_ne!(F::new_unchecked(8), F(1)); assert_eq!(F(3).get(), 3u32); // `From<{T, BigUint, BigInt}>` assert_eq!(F::from(3), F(3)); assert_eq!(F::from(BigUint::new(vec![3])), F(3)); assert_eq!(F::from(BigInt::new(Sign::Minus, vec![4])), F(3)); // `Display`, `Debug` assert_eq!(F(3).to_string(), "3"); assert_eq!(format!("{:?}", F(3)), "3"); // `FromStr` assert_eq!("3".parse::<F>(), Ok(F(3))); // `Deref` assert_eq!(*F(3), 3); assert_eq!(F(3).to_i64(), Some(3i64)); assert_eq!(F(3).to_biguint(), 3u64.to_biguint()); assert_eq!(F(3).to_bigint(), 3u64.to_bigint()); // `Neg` assert_eq!(-F(1), F(6)); // `Add`, `Sub`, `Mul`, `Div`, `Rem` assert_eq!(F(3) + F(4), F(0)); assert_eq!(F(3) - F(4), F(6)); assert_eq!(F(3) * F(4), F(5)); assert_eq!(F(3) / F(4), F(6)); (0..=6).for_each(|x| (1..=6).for_each(|y| assert_eq!(F(x) % F(y), F(0)))); // `Num` assert_eq!(F::from_str_radix("111", 2), Ok(F(0))); // `Unsigned` static_assert_unsigned::<F>(); // `Bounded` assert_eq!((F::min_value(), F::max_value()), (F(0), F(6))); // `Zero`, `One` assert_eq!(F::zero(), F(0)); assert_eq!(F::one(), F(1)); // `FromPrimitive` assert_eq!(F::from_i128(-1), Some(-F(1))); assert_eq!(F::from_f64(0.5), Some(F(1) / F(2))); // `Inv` assert_eq!(F(3).inv(), F(5)); // `CheckedNeg` (0..=6).for_each(|x| assert!(F(x).checked_neg().is_some())); // `CheckedAdd`, `CheckedSub`, `CheckedMul`, `CheckedDiv`, `CheckedRem` (0..=6).for_each(|x| (0..=6).for_each(|y| assert!(F(x).checked_add(&F(y)).is_some()))); assert_eq!( num::range_step(F(0), F(6), F(2)).collect::<Vec<_>>(), &[F(0), F(2), F(4)], ); (0..=6).for_each(|x| (0..=6).for_each(|y| assert!(F(x).checked_sub(&F(y)).is_some()))); (0..=6).for_each(|x| (0..=6).for_each(|y| assert!(F(x).checked_mul(&F(y)).is_some()))); (0..=6).for_each(|x| (1..=6).for_each(|y| assert!(F(x).checked_div(&F(y)).is_some()))); (0..=6).for_each(|x| assert!(F(x).checked_div(&F(0)).is_none())); (0..=6).for_each(|x| (1..=6).for_each(|y| assert!(F(x).checked_rem(&F(y)).is_some()))); (0..=6).for_each(|x| assert!(F(x).checked_rem(&F(0)).is_none())); // `Pow` assert_eq!(F(3).pow(2u8), F(2)); assert_eq!(F(3).pow(2u16), F(2)); assert_eq!(F(3).pow(2u32), F(2)); assert_eq!(F(3).pow(2u64), F(2)); assert_eq!(F(3).pow(2u128), F(2)); assert_eq!(F(3).pow(2usize), F(2)); assert_eq!(F(3).pow(-2i8), F(4)); assert_eq!(F(3).pow(-2i16), F(4)); assert_eq!(F(3).pow(-2i32), F(4)); assert_eq!(F(3).pow(-2i64), F(4)); assert_eq!(F(3).pow(-2i128), F(4)); assert_eq!(F(3).pow(-2isize), F(4));
Methods
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> ModType<T, C, M>
[src]
pub fn modulus() -> T
[src]
Gets the modulus.
pub fn new(value: T) -> Self
[src]
Creates a new ModType
.
pub fn new_unchecked(value: T) -> Self
[src]
Creates a new ModType
without checking value
.
pub fn get(self) -> T
[src]
Gets the inner value.
pub fn get_mut_unchecked(&mut self) -> &mut T
[src]
Returns a mutable reference to the inner value.
Trait Implementations
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> PartialOrd<ModType<T, C, M>> for ModType<T, C, M>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
fn lt(&self, other: &Self) -> bool
[src]
fn le(&self, other: &Self) -> bool
[src]
fn gt(&self, other: &Self) -> bool
[src]
fn ge(&self, other: &Self) -> bool
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> PartialEq<ModType<T, C, M>> for ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Copy for ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Ord for ModType<T, C, M>
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Eq for ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Default for ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> From<T> for ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> From<BigUint> for ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> From<BigInt> for ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Clone for ModType<T, C, M>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Deref for ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Add<ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Addition = True>,
[src]
<C as Cartridge>::Features: Features<Addition = True>,
type Output = ModType<T, C, M>
The resulting type after applying the +
operator.
fn add(self, rhs: ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Add<&'_ ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Addition = True>,
[src]
<C as Cartridge>::Features: Features<Addition = True>,
type Output = ModType<T, C, M>
The resulting type after applying the +
operator.
fn add(self, rhs: &ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Add<ModType<T, C, M>> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Addition = True>,
[src]
<C as Cartridge>::Features: Features<Addition = True>,
type Output = ModType<T, C, M>
The resulting type after applying the +
operator.
fn add(self, rhs: ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Add<&'_ ModType<T, C, M>> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Addition = True>,
[src]
<C as Cartridge>::Features: Features<Addition = True>,
type Output = ModType<T, C, M>
The resulting type after applying the +
operator.
fn add(self, rhs: &ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Sub<ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Subtraction = True>,
[src]
<C as Cartridge>::Features: Features<Subtraction = True>,
type Output = ModType<T, C, M>
The resulting type after applying the -
operator.
fn sub(self, rhs: ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Sub<&'_ ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Subtraction = True>,
[src]
<C as Cartridge>::Features: Features<Subtraction = True>,
type Output = ModType<T, C, M>
The resulting type after applying the -
operator.
fn sub(self, rhs: &ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Sub<ModType<T, C, M>> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Subtraction = True>,
[src]
<C as Cartridge>::Features: Features<Subtraction = True>,
type Output = ModType<T, C, M>
The resulting type after applying the -
operator.
fn sub(self, rhs: ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Sub<&'_ ModType<T, C, M>> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Subtraction = True>,
[src]
<C as Cartridge>::Features: Features<Subtraction = True>,
type Output = ModType<T, C, M>
The resulting type after applying the -
operator.
fn sub(self, rhs: &ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Mul<ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
type Output = ModType<T, C, M>
The resulting type after applying the *
operator.
fn mul(self, rhs: ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Mul<&'_ ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
type Output = ModType<T, C, M>
The resulting type after applying the *
operator.
fn mul(self, rhs: &ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Mul<ModType<T, C, M>> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
type Output = ModType<T, C, M>
The resulting type after applying the *
operator.
fn mul(self, rhs: ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Mul<&'_ ModType<T, C, M>> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
type Output = ModType<T, C, M>
The resulting type after applying the *
operator.
fn mul(self, rhs: &ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Div<ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The resulting type after applying the /
operator.
fn div(self, rhs: ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Div<&'_ ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The resulting type after applying the /
operator.
fn div(self, rhs: &ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Div<ModType<T, C, M>> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The resulting type after applying the /
operator.
fn div(self, rhs: ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Div<&'_ ModType<T, C, M>> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The resulting type after applying the /
operator.
fn div(self, rhs: &ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Rem<ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The resulting type after applying the %
operator.
fn rem(self, rhs: ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Rem<&'_ ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The resulting type after applying the %
operator.
fn rem(self, rhs: &ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Rem<ModType<T, C, M>> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The resulting type after applying the %
operator.
fn rem(self, rhs: ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Rem<&'_ ModType<T, C, M>> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The resulting type after applying the %
operator.
fn rem(self, rhs: &ModType<T, C, M>) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Neg for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Subtraction = True>,
[src]
<C as Cartridge>::Features: Features<Subtraction = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Neg for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Subtraction = True>,
[src]
<C as Cartridge>::Features: Features<Subtraction = True>,
type Output = ModType<T, C, M>
The resulting type after applying the -
operator.
fn neg(self) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> AddAssign<ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Addition = True>,
[src]
<C as Cartridge>::Features: Features<Addition = True>,
fn add_assign(&mut self, rhs: Self)
[src]
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> AddAssign<&'_ ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Addition = True>,
[src]
<C as Cartridge>::Features: Features<Addition = True>,
fn add_assign(&mut self, rhs: &Self)
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> SubAssign<ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Subtraction = True>,
[src]
<C as Cartridge>::Features: Features<Subtraction = True>,
fn sub_assign(&mut self, rhs: Self)
[src]
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> SubAssign<&'_ ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Subtraction = True>,
[src]
<C as Cartridge>::Features: Features<Subtraction = True>,
fn sub_assign(&mut self, rhs: &Self)
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> MulAssign<ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
fn mul_assign(&mut self, rhs: Self)
[src]
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> MulAssign<&'_ ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
fn mul_assign(&mut self, rhs: &Self)
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> DivAssign<ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Division = True>,
fn div_assign(&mut self, rhs: Self)
[src]
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> DivAssign<&'_ ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Division = True>,
fn div_assign(&mut self, rhs: &Self)
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> RemAssign<ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Division = True>,
fn rem_assign(&mut self, rhs: Self)
[src]
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> RemAssign<&'_ ModType<T, C, M>> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Division = True>,
fn rem_assign(&mut self, rhs: &Self)
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Debug for ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Display for ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> FromStr for ModType<T, C, M>
[src]
type Err = ParseIntError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, ParseIntError>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> CheckedMul for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
fn checked_mul(&self, rhs: &Self) -> Option<Self>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Zero for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Addition = True>,
[src]
<C as Cartridge>::Features: Features<Addition = True>,
fn zero() -> Self
[src]
fn is_zero(&self) -> bool
[src]
fn set_zero(&mut self)
[src]
Sets self
to the additive identity element of Self
, 0
.
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> One for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
fn one() -> Self
[src]
fn is_one(&self) -> bool
[src]
fn set_one(&mut self)
[src]
Sets self
to the multiplicative identity element of Self
, 1
.
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> FromPrimitive for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Subtraction = True, Multiplication = True, Division = True>,
[src]
<C as Cartridge>::Features: Features<Subtraction = True, Multiplication = True, Division = True>,
fn from_i64(value: i64) -> Option<Self>
[src]
fn from_u64(value: u64) -> Option<Self>
[src]
fn from_i8(value: i8) -> Option<Self>
[src]
fn from_i16(value: i16) -> Option<Self>
[src]
fn from_i32(value: i32) -> Option<Self>
[src]
fn from_i128(value: i128) -> Option<Self>
[src]
fn from_isize(value: isize) -> Option<Self>
[src]
fn from_u8(value: u8) -> Option<Self>
[src]
fn from_u16(value: u16) -> Option<Self>
[src]
fn from_u32(value: u32) -> Option<Self>
[src]
fn from_u128(value: u128) -> Option<Self>
[src]
fn from_usize(value: usize) -> Option<Self>
[src]
fn from_f32(value: f32) -> Option<Self>
[src]
fn from_f64(value: f64) -> Option<Self>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Inv for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn inv(self) -> ModType<T, C, M>
[src]
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Inv for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn inv(self) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> CheckedNeg for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Subtraction = True>,
[src]
<C as Cartridge>::Features: Features<Subtraction = True>,
fn checked_neg(&self) -> Option<Self>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> CheckedAdd for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Addition = True>,
[src]
<C as Cartridge>::Features: Features<Addition = True>,
fn checked_add(&self, rhs: &Self) -> Option<Self>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> CheckedSub for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Subtraction = True>,
[src]
<C as Cartridge>::Features: Features<Subtraction = True>,
fn checked_sub(&self, rhs: &Self) -> Option<Self>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> CheckedDiv for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Division = True>,
fn checked_div(&self, rhs: &Self) -> Option<Self>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> CheckedRem for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Division = True>,
fn checked_rem(&self, rhs: &Self) -> Option<Self>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<u8> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ u8> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<u8> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: u8) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ u8> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: &u8) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<u16> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ u16> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<u16> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: u16) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ u16> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: &u16) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<u32> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ u32> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<u32> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: u32) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ u32> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: &u32) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<u64> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ u64> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<u64> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: u64) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ u64> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: &u64) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<u128> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ u128> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<u128> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: u128) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ u128> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: &u128) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<usize> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ usize> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<usize> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: usize) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ usize> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: &usize) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<i8> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ i8> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<i8> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: i8) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ i8> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: &i8) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<i16> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ i16> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<i16> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: i16) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ i16> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: &i16) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<i32> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ i32> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<i32> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: i32) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ i32> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: &i32) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<i64> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ i64> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<i64> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: i64) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ i64> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: &i64) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<i128> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ i128> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<i128> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: i128) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ i128> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: &i128) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<isize> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ isize> for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
impl<'_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<isize> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: isize) -> ModType<T, C, M>
[src]
impl<'_, '_, T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Pow<&'_ isize> for &'_ ModType<T, C, M> where
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
[src]
<C as Cartridge>::Features: Features<Multiplication = True>,
<C as Cartridge>::Features: Features<Division = True>,
type Output = ModType<T, C, M>
The result after applying the operator.
fn pow(self, exp: &isize) -> ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Bounded for ModType<T, C, M>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Num for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Addition = True, Subtraction = True, Multiplication = True, Division = True>,
[src]
<C as Cartridge>::Features: Features<Addition = True, Subtraction = True, Multiplication = True, Division = True>,
type FromStrRadixErr = ParseIntError
fn from_str_radix(str: &str, radix: u32) -> Result<Self, ParseIntError>
[src]
impl<T: UnsignedPrimitive, C: Cartridge<Target = T>, M: ConstValue<Value = T>> Unsigned for ModType<T, C, M> where
<C as Cartridge>::Features: Features<Addition = True, Subtraction = True, Multiplication = True, Division = True>,
[src]
<C as Cartridge>::Features: Features<Addition = True, Subtraction = True, Multiplication = True, Division = True>,
Auto Trait Implementations
impl<T, C, M> Send for ModType<T, C, M>
impl<T, C, M> Unpin for ModType<T, C, M> where
T: Unpin,
T: Unpin,
impl<T, C, M> Sync for ModType<T, C, M>
impl<T, C, M> UnwindSafe for ModType<T, C, M> where
T: UnwindSafe,
T: UnwindSafe,
impl<T, C, M> RefUnwindSafe for ModType<T, C, M> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[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, 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> NumRef for T where
T: Num + NumOps<&'r T, T>,
[src]
T: Num + NumOps<&'r T, 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, 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> NumAssignRef for T where
T: NumAssign + NumAssignOps<&'r T>,
[src]
T: NumAssign + NumAssignOps<&'r T>,
impl<T, Base> RefNum<Base> for T where
T: NumOps<Base, Base> + NumOps<&'r Base, Base>,
[src]
T: NumOps<Base, Base> + NumOps<&'r Base, Base>,
impl<T> NumAssign for T where
T: Num + NumAssignOps<T>,
[src]
T: Num + NumAssignOps<T>,