[−][src]Struct gmp::mpq::Mpq
Implementations
impl Mpq
[src]
pub unsafe fn inner(&self) -> mpq_srcptr
[src]
pub unsafe fn inner_mut(&mut self) -> mpq_ptr
[src]
pub fn new() -> Mpq
[src]
pub fn ratio(num: &Mpz, den: &Mpz) -> Mpq
[src]
pub fn from_str_radix(s: &str, base: u8) -> Result<Mpq, ParseMpqError>
[src]
pub fn set(&mut self, other: &Mpq)
[src]
pub fn set_z(&mut self, other: &Mpz)
[src]
pub fn set_d(&mut self, other: f64)
[src]
pub fn set_f(&mut self, other: &Mpf)
[src]
pub fn get_num(&self) -> Mpz
[src]
pub fn get_den(&self) -> Mpz
[src]
pub fn abs(&self) -> Mpq
[src]
pub fn invert(&self) -> Mpq
[src]
pub fn floor(&self) -> Mpz
[src]
pub fn ceil(&self) -> Mpz
[src]
pub fn sign(&self) -> Sign
[src]
pub fn one() -> Mpq
[src]
pub fn zero() -> Mpq
[src]
pub fn is_zero(&self) -> bool
[src]
Trait Implementations
impl<'a> Add<&'a Mpq> for Mpq
[src]
type Output = Mpq
The resulting type after applying the +
operator.
fn add(self, other: &Mpq) -> Mpq
[src]
impl<'a, 'b> Add<&'a Mpq> for &'b Mpq
[src]
type Output = Mpq
The resulting type after applying the +
operator.
fn add(self, other: &Mpq) -> Mpq
[src]
impl Add<Mpq> for Mpq
[src]
type Output = Mpq
The resulting type after applying the +
operator.
fn add(self, other: Mpq) -> Mpq
[src]
impl<'a> Add<Mpq> for &'a Mpq
[src]
type Output = Mpq
The resulting type after applying the +
operator.
fn add(self, other: Mpq) -> Mpq
[src]
impl<'a> AddAssign<&'a Mpq> for Mpq
[src]
fn add_assign(&mut self, other: &Mpq)
[src]
impl<'a> AddAssign<Mpq> for Mpq
[src]
fn add_assign(&mut self, other: Mpq)
[src]
impl Clone for Mpq
[src]
impl Debug for Mpq
[src]
fn fmt(&self, f: &mut Formatter<'_>) -> Result
[src]
Renders as numer/denom
. If denom=1, renders as numer.
impl Display for Mpq
[src]
fn fmt(&self, f: &mut Formatter<'_>) -> Result
[src]
Renders as numer/denom
. If denom=1, renders as numer.
impl<'a> Div<&'a Mpq> for Mpq
[src]
type Output = Mpq
The resulting type after applying the /
operator.
fn div(self, other: &Mpq) -> Mpq
[src]
impl<'a, 'b> Div<&'a Mpq> for &'b Mpq
[src]
type Output = Mpq
The resulting type after applying the /
operator.
fn div(self, other: &Mpq) -> Mpq
[src]
impl Div<Mpq> for Mpq
[src]
type Output = Mpq
The resulting type after applying the /
operator.
fn div(self, other: Mpq) -> Mpq
[src]
impl<'a> Div<Mpq> for &'a Mpq
[src]
type Output = Mpq
The resulting type after applying the /
operator.
fn div(self, other: Mpq) -> Mpq
[src]
impl<'a> DivAssign<&'a Mpq> for Mpq
[src]
fn div_assign(&mut self, other: &Mpq)
[src]
impl<'a> DivAssign<Mpq> for Mpq
[src]
fn div_assign(&mut self, other: Mpq)
[src]
impl Drop for Mpq
[src]
impl Eq for Mpq
[src]
impl<'a> From<&'a Mpq> for f64
[src]
impl<'a> From<&'a Mpz> for Mpq
[src]
impl From<Mpq> for f64
[src]
impl From<Mpz> for Mpq
[src]
impl From<i32> for Mpq
[src]
impl From<i64> for Mpq
[src]
impl From<u32> for Mpq
[src]
impl From<u64> for Mpq
[src]
impl FromStr for Mpq
[src]
type Err = ParseMpqError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Mpq, ParseMpqError>
[src]
impl<'a> Mul<&'a Mpq> for Mpq
[src]
type Output = Mpq
The resulting type after applying the *
operator.
fn mul(self, other: &Mpq) -> Mpq
[src]
impl<'a, 'b> Mul<&'a Mpq> for &'b Mpq
[src]
type Output = Mpq
The resulting type after applying the *
operator.
fn mul(self, other: &Mpq) -> Mpq
[src]
impl Mul<Mpq> for Mpq
[src]
type Output = Mpq
The resulting type after applying the *
operator.
fn mul(self, other: Mpq) -> Mpq
[src]
impl<'a> Mul<Mpq> for &'a Mpq
[src]
type Output = Mpq
The resulting type after applying the *
operator.
fn mul(self, other: Mpq) -> Mpq
[src]
impl<'a> MulAssign<&'a Mpq> for Mpq
[src]
fn mul_assign(&mut self, other: &Mpq)
[src]
impl<'a> MulAssign<Mpq> for Mpq
[src]
fn mul_assign(&mut self, other: Mpq)
[src]
impl<'b> Neg for &'b Mpq
[src]
impl Neg for Mpq
[src]
impl One for Mpq
[src]
fn one() -> Mpq
[src]
fn set_one(&mut self)
[src]
fn is_one(&self) -> bool where
Self: PartialEq<Self>,
[src]
Self: PartialEq<Self>,
impl Ord for Mpq
[src]
fn cmp(&self, other: &Mpq) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Mpq> for Mpq
[src]
impl PartialOrd<Mpq> for Mpq
[src]
fn partial_cmp(&self, other: &Mpq) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Send for Mpq
[src]
impl<'a> Sub<&'a Mpq> for Mpq
[src]
type Output = Mpq
The resulting type after applying the -
operator.
fn sub(self, other: &Mpq) -> Mpq
[src]
impl<'a, 'b> Sub<&'a Mpq> for &'b Mpq
[src]
type Output = Mpq
The resulting type after applying the -
operator.
fn sub(self, other: &Mpq) -> Mpq
[src]
impl Sub<Mpq> for Mpq
[src]
type Output = Mpq
The resulting type after applying the -
operator.
fn sub(self, other: Mpq) -> Mpq
[src]
impl<'a> Sub<Mpq> for &'a Mpq
[src]
type Output = Mpq
The resulting type after applying the -
operator.
fn sub(self, other: Mpq) -> Mpq
[src]
impl<'a> SubAssign<&'a Mpq> for Mpq
[src]
fn sub_assign(&mut self, other: &Mpq)
[src]
impl<'a> SubAssign<Mpq> for Mpq
[src]
fn sub_assign(&mut self, other: Mpq)
[src]
impl Sync for Mpq
[src]
impl Zero for Mpq
[src]
Auto Trait Implementations
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,
fn borrow_mut(&mut self) -> &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> 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> 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.
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>,