pub struct Fraction(pub Rational32);
Tuple Fields
0: Rational32
Implementations
Trait Implementations
sourceimpl AddAssign<&'_ Fraction> for Fraction
impl AddAssign<&'_ Fraction> for Fraction
sourcefn add_assign(&mut self, other: &Fraction)
fn add_assign(&mut self, other: &Fraction)
Performs the +=
operation. Read more
sourceimpl AddAssign<&'_ i32> for Fraction
impl AddAssign<&'_ i32> for Fraction
sourcefn add_assign(&mut self, other: &i32)
fn add_assign(&mut self, other: &i32)
Performs the +=
operation. Read more
sourceimpl AddAssign<Fraction> for Fraction
impl AddAssign<Fraction> for Fraction
sourcefn add_assign(&mut self, other: Fraction)
fn add_assign(&mut self, other: Fraction)
Performs the +=
operation. Read more
sourceimpl AddAssign<i32> for Fraction
impl AddAssign<i32> for Fraction
sourcefn add_assign(&mut self, other: i32)
fn add_assign(&mut self, other: i32)
Performs the +=
operation. Read more
sourceimpl AsRef<Ratio<i32>> for Fraction
impl AsRef<Ratio<i32>> for Fraction
sourcefn as_ref(&self) -> &Rational32
fn as_ref(&self) -> &Rational32
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl DerefMut for Fraction
impl DerefMut for Fraction
sourcefn deref_mut(&mut self) -> &mut Rational32
fn deref_mut(&mut self) -> &mut Rational32
Mutably dereferences the value.
sourceimpl<'de> Deserialize<'de> for Fraction
impl<'de> Deserialize<'de> for Fraction
sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
sourceimpl DivAssign<&'_ Fraction> for Fraction
impl DivAssign<&'_ Fraction> for Fraction
sourcefn div_assign(&mut self, other: &Fraction)
fn div_assign(&mut self, other: &Fraction)
Performs the /=
operation. Read more
sourceimpl DivAssign<&'_ i32> for Fraction
impl DivAssign<&'_ i32> for Fraction
sourcefn div_assign(&mut self, other: &i32)
fn div_assign(&mut self, other: &i32)
Performs the /=
operation. Read more
sourceimpl DivAssign<Fraction> for Fraction
impl DivAssign<Fraction> for Fraction
sourcefn div_assign(&mut self, other: Fraction)
fn div_assign(&mut self, other: Fraction)
Performs the /=
operation. Read more
sourceimpl DivAssign<i32> for Fraction
impl DivAssign<i32> for Fraction
sourcefn div_assign(&mut self, other: i32)
fn div_assign(&mut self, other: i32)
Performs the /=
operation. Read more
sourceimpl From<Fraction> for Rational32
impl From<Fraction> for Rational32
sourceimpl From<Ratio<i32>> for Fraction
impl From<Ratio<i32>> for Fraction
sourcefn from(x: Rational32) -> Self
fn from(x: Rational32) -> Self
Converts to this type from the input type.
sourceimpl<'a> FromValue<'a> for Fraction
impl<'a> FromValue<'a> for Fraction
type Checker = GenericValueTypeChecker<Fraction>
type Checker = GenericValueTypeChecker<Fraction>
Value type checker.
sourceunsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Get the contained value from a Value
. Read more
sourceimpl MulAssign<&'_ Fraction> for Fraction
impl MulAssign<&'_ Fraction> for Fraction
sourcefn mul_assign(&mut self, other: &Fraction)
fn mul_assign(&mut self, other: &Fraction)
Performs the *=
operation. Read more
sourceimpl MulAssign<&'_ i32> for Fraction
impl MulAssign<&'_ i32> for Fraction
sourcefn mul_assign(&mut self, other: &i32)
fn mul_assign(&mut self, other: &i32)
Performs the *=
operation. Read more
sourceimpl MulAssign<Fraction> for Fraction
impl MulAssign<Fraction> for Fraction
sourcefn mul_assign(&mut self, other: Fraction)
fn mul_assign(&mut self, other: Fraction)
Performs the *=
operation. Read more
sourceimpl MulAssign<i32> for Fraction
impl MulAssign<i32> for Fraction
sourcefn mul_assign(&mut self, other: i32)
fn mul_assign(&mut self, other: i32)
Performs the *=
operation. Read more
sourceimpl Ord for Fraction
impl Ord for Fraction
sourceimpl PartialOrd<Fraction> for Fraction
impl PartialOrd<Fraction> for Fraction
sourcefn partial_cmp(&self, other: &Fraction) -> Option<Ordering>
fn partial_cmp(&self, other: &Fraction) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl RemAssign<&'_ Fraction> for Fraction
impl RemAssign<&'_ Fraction> for Fraction
sourcefn rem_assign(&mut self, other: &Fraction)
fn rem_assign(&mut self, other: &Fraction)
Performs the %=
operation. Read more
sourceimpl RemAssign<&'_ i32> for Fraction
impl RemAssign<&'_ i32> for Fraction
sourcefn rem_assign(&mut self, other: &i32)
fn rem_assign(&mut self, other: &i32)
Performs the %=
operation. Read more
sourceimpl RemAssign<Fraction> for Fraction
impl RemAssign<Fraction> for Fraction
sourcefn rem_assign(&mut self, other: Fraction)
fn rem_assign(&mut self, other: Fraction)
Performs the %=
operation. Read more
sourceimpl RemAssign<i32> for Fraction
impl RemAssign<i32> for Fraction
sourcefn rem_assign(&mut self, other: i32)
fn rem_assign(&mut self, other: i32)
Performs the %=
operation. Read more
sourceimpl StaticType for Fraction
impl StaticType for Fraction
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of Self
.
sourceimpl SubAssign<&'_ Fraction> for Fraction
impl SubAssign<&'_ Fraction> for Fraction
sourcefn sub_assign(&mut self, other: &Fraction)
fn sub_assign(&mut self, other: &Fraction)
Performs the -=
operation. Read more
sourceimpl SubAssign<&'_ i32> for Fraction
impl SubAssign<&'_ i32> for Fraction
sourcefn sub_assign(&mut self, other: &i32)
fn sub_assign(&mut self, other: &i32)
Performs the -=
operation. Read more
sourceimpl SubAssign<Fraction> for Fraction
impl SubAssign<Fraction> for Fraction
sourcefn sub_assign(&mut self, other: Fraction)
fn sub_assign(&mut self, other: Fraction)
Performs the -=
operation. Read more
sourceimpl SubAssign<i32> for Fraction
impl SubAssign<i32> for Fraction
sourcefn sub_assign(&mut self, other: i32)
fn sub_assign(&mut self, other: i32)
Performs the -=
operation. Read more
impl Copy for Fraction
impl Eq for Fraction
impl StructuralEq for Fraction
impl StructuralPartialEq for Fraction
Auto Trait Implementations
impl RefUnwindSafe for Fraction
impl Send for Fraction
impl Sync for Fraction
impl Unpin for Fraction
impl UnwindSafe for Fraction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> StaticTypeExt for T where
T: StaticType,
impl<T> StaticTypeExt for T where
T: StaticType,
sourcefn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
sourceimpl<T> ToClosureReturnValue for T where
T: ToValue,
impl<T> ToClosureReturnValue for T where
T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
sourcefn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a SendValue
clone of self
.