[][src]Trait rug::Assign

pub trait Assign<Src = Self> {
    fn assign(&mut self, src: Src);

Assigns to a number from another value.


use rug::Assign;
struct I(i32);
impl Assign<i16> for I {
    fn assign(&mut self, rhs: i16) {
        self.0 = rhs.into();
let mut i = I(0);
assert_eq!(i.0, 42);

Required methods

fn assign(&mut self, src: Src)

Peforms the assignement.


use rug::{Assign, Integer};
let mut i = Integer::from(15);
assert_eq!(i, 15);
assert_eq!(i, 23);
Loading content...

Implementations on Foreign Types

impl Assign<i8> for i8[src]

impl<'_> Assign<&'_ i8> for i8[src]

impl Assign<i16> for i16[src]

impl<'_> Assign<&'_ i16> for i16[src]

impl Assign<i32> for i32[src]

impl<'_> Assign<&'_ i32> for i32[src]

impl Assign<i64> for i64[src]

impl<'_> Assign<&'_ i64> for i64[src]

impl Assign<i128> for i128[src]

impl<'_> Assign<&'_ i128> for i128[src]

impl Assign<isize> for isize[src]

impl<'_> Assign<&'_ isize> for isize[src]

impl Assign<u8> for u8[src]

impl<'_> Assign<&'_ u8> for u8[src]

impl Assign<u16> for u16[src]

impl<'_> Assign<&'_ u16> for u16[src]

impl Assign<u32> for u32[src]

impl<'_> Assign<&'_ u32> for u32[src]

impl Assign<u64> for u64[src]

impl<'_> Assign<&'_ u64> for u64[src]

impl Assign<u128> for u128[src]

impl<'_> Assign<&'_ u128> for u128[src]

impl Assign<usize> for usize[src]

impl<'_> Assign<&'_ usize> for usize[src]

impl Assign<f32> for f32[src]

impl<'_> Assign<&'_ f32> for f32[src]

impl Assign<f64> for f64[src]

impl<'_> Assign<&'_ f64> for f64[src]

impl<'_> Assign<&'_ str> for String[src]

impl<'a> Assign<&'a str> for Cow<'a, str>[src]

impl<'a> Assign<Cow<'a, str>> for Cow<'a, str>[src]

Loading content...


impl Assign<bool> for Integer[src]

impl Assign<i8> for Integer[src]

impl Assign<i16> for Integer[src]

impl Assign<i32> for Integer[src]

impl Assign<i64> for Integer[src]

impl Assign<i128> for Integer[src]

impl Assign<isize> for Integer[src]

impl Assign<u8> for Integer[src]

impl Assign<u16> for Integer[src]

impl Assign<u32> for Integer[src]

impl Assign<u64> for Integer[src]

impl Assign<u128> for Integer[src]

impl Assign<usize> for Integer[src]

impl Assign<SmallComplex> for SmallComplex[src]

impl Assign<SmallFloat> for SmallFloat[src]

impl Assign<SmallInteger> for SmallInteger[src]

impl Assign<SmallRational> for SmallRational[src]

impl Assign<Integer> for Integer[src]

impl Assign<Rational> for Rational[src]

impl<'_> Assign<&'_ bool> for Integer[src]

impl<'_> Assign<&'_ i8> for Integer[src]

impl<'_> Assign<&'_ i16> for Integer[src]

impl<'_> Assign<&'_ i32> for Integer[src]

impl<'_> Assign<&'_ i64> for Integer[src]

impl<'_> Assign<&'_ i128> for Integer[src]

impl<'_> Assign<&'_ isize> for Integer[src]

impl<'_> Assign<&'_ u8> for Integer[src]

impl<'_> Assign<&'_ u16> for Integer[src]

impl<'_> Assign<&'_ u32> for Integer[src]

impl<'_> Assign<&'_ u64> for Integer[src]

impl<'_> Assign<&'_ u128> for Integer[src]

impl<'_> Assign<&'_ usize> for Integer[src]

impl<'_> Assign<&'_ SmallComplex> for SmallComplex[src]

impl<'_> Assign<&'_ SmallFloat> for SmallFloat[src]

impl<'_> Assign<&'_ SmallInteger> for SmallInteger[src]

impl<'_> Assign<&'_ SmallRational> for SmallRational[src]

impl<'_> Assign<&'_ Integer> for Integer[src]

impl<'_> Assign<&'_ Rational> for Rational[src]

impl<'a, Num, Den> Assign<&'a (Num, Den)> for Rational where
    Integer: Assign<&'a Num> + Assign<&'a Den>, 

impl<Num> Assign<Num> for Rational where
    Integer: Assign<Num>, 

impl<Num, Den> Assign<(Num, Den)> for Rational where
    Integer: Assign<Num> + Assign<Den>, 

impl<Num: ToSmall> Assign<Num> for SmallRational[src]

impl<Num: ToSmall, Den: ToSmall> Assign<(Num, Den)> for SmallRational[src]

impl<Re: ToSmall> Assign<Re> for SmallComplex[src]

impl<Re: ToSmall, Im: ToSmall> Assign<(Re, Im)> for SmallComplex[src]

impl<T> Assign<T> for Complex where
    Self: AssignRound<T, Round = (Round, Round), Ordering = (Ordering, Ordering)>, 

impl<T> Assign<T> for Float where
    Self: AssignRound<T, Round = Round, Ordering = Ordering>, 

impl<T: ToSmall> Assign<T> for SmallFloat[src]

impl<T: ToSmall> Assign<T> for SmallInteger[src]

Loading content...