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 moresourceimpl 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 moresourceimpl 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 moresourceimpl 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 moresourceimpl 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 moresourceimpl 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 moresourceimpl 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 moresourceimpl 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 moresourceimpl 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 moresourceimpl 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 moresourceimpl 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 moresourceimpl 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 moresourceimpl 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 moresourceimpl Ord for Fraction
impl Ord for Fraction
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
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>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 moresourceimpl 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 moresourceimpl 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 moresourceimpl 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 moresourceimpl 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 moresourceimpl 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 moresourceimpl 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 moresourceimpl 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 moresourceimpl 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 moreimpl 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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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 Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
sourcefn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
sourceimpl<T> ToClosureReturnValue for Twhere
T: ToValue,
impl<T> ToClosureReturnValue for Twhere
T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
sourceimpl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
sourcefn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a
SendValue
clone of self
.