Skip to main content

Fraction

Struct Fraction 

Source
pub struct Fraction(pub Rational32);

Tuple Fields§

§0: Rational32

Implementations§

Source§

impl Fraction

Source

pub fn new(numer: i32, denom: i32) -> Self

Creates a new Ratio.

§Panics

Panics if denom is zero.

Source

pub const fn new_raw(numer: i32, denom: i32) -> Self

Creates a Fraction without checking for denom == 0 or reducing.

While this does not panic, there are several methods that will panic if used on a Fraction with denom == 0.

Source

pub const fn from_integer(t: i32) -> Self

Creates a Fraction representing the integer t.

Source

pub fn approximate_f32(x: f32) -> Option<Self>

Source

pub fn approximate_f64(x: f64) -> Option<Self>

Source

pub fn numer(&self) -> i32

Source

pub fn denom(&self) -> i32

Source

pub fn simplify(&mut self, n_terms: u32, threshold: u32)

Trait Implementations§

Source§

impl Add for Fraction

Source§

type Output = Fraction

The resulting type after applying the + operator.
Source§

fn add(self, other: Fraction) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Fraction> for Fraction

Source§

type Output = Fraction

The resulting type after applying the + operator.
Source§

fn add(self, other: &Fraction) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Fraction> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the + operator.
Source§

fn add(self, other: &Fraction) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Fraction> for i32

Source§

type Output = Fraction

The resulting type after applying the + operator.
Source§

fn add(self, other: &Fraction) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Fraction> for &i32

Source§

type Output = Fraction

The resulting type after applying the + operator.
Source§

fn add(self, other: &Fraction) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&i32> for Fraction

Source§

type Output = Fraction

The resulting type after applying the + operator.
Source§

fn add(self, other: &i32) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&i32> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the + operator.
Source§

fn add(self, other: &i32) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Fraction> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the + operator.
Source§

fn add(self, other: Fraction) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Fraction> for i32

Source§

type Output = Fraction

The resulting type after applying the + operator.
Source§

fn add(self, other: Fraction) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Fraction> for &i32

Source§

type Output = Fraction

The resulting type after applying the + operator.
Source§

fn add(self, other: Fraction) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<i32> for Fraction

Source§

type Output = Fraction

The resulting type after applying the + operator.
Source§

fn add(self, other: i32) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<i32> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the + operator.
Source§

fn add(self, other: i32) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign for Fraction

Source§

fn add_assign(&mut self, other: Fraction)

Performs the += operation. Read more
Source§

impl AddAssign<&Fraction> for Fraction

Source§

fn add_assign(&mut self, other: &Fraction)

Performs the += operation. Read more
Source§

impl AddAssign<&i32> for Fraction

Source§

fn add_assign(&mut self, other: &i32)

Performs the += operation. Read more
Source§

impl AddAssign<i32> for Fraction

Source§

fn add_assign(&mut self, other: i32)

Performs the += operation. Read more
Source§

impl AsRef<Ratio<i32>> for Fraction

Source§

fn as_ref(&self) -> &Rational32

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for Fraction

Source§

fn clone(&self) -> Fraction

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Fraction

Source§

impl Debug for Fraction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for Fraction

Source§

type Target = Ratio<i32>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for Fraction

Source§

fn deref_mut(&mut self) -> &mut Rational32

Mutably dereferences the value.
Source§

impl<'de> Deserialize<'de> for Fraction

Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Fraction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Div for Fraction

Source§

type Output = Fraction

The resulting type after applying the / operator.
Source§

fn div(self, other: Fraction) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<&Fraction> for Fraction

Source§

type Output = Fraction

The resulting type after applying the / operator.
Source§

fn div(self, other: &Fraction) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<&Fraction> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the / operator.
Source§

fn div(self, other: &Fraction) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<&Fraction> for i32

Source§

type Output = Fraction

The resulting type after applying the / operator.
Source§

fn div(self, other: &Fraction) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<&Fraction> for &i32

Source§

type Output = Fraction

The resulting type after applying the / operator.
Source§

fn div(self, other: &Fraction) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<&i32> for Fraction

Source§

type Output = Fraction

The resulting type after applying the / operator.
Source§

fn div(self, other: &i32) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<&i32> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the / operator.
Source§

fn div(self, other: &i32) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<Fraction> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the / operator.
Source§

fn div(self, other: Fraction) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<Fraction> for i32

Source§

type Output = Fraction

The resulting type after applying the / operator.
Source§

fn div(self, other: Fraction) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<Fraction> for &i32

Source§

type Output = Fraction

The resulting type after applying the / operator.
Source§

fn div(self, other: Fraction) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<i32> for Fraction

Source§

type Output = Fraction

The resulting type after applying the / operator.
Source§

fn div(self, other: i32) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<i32> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the / operator.
Source§

fn div(self, other: i32) -> Self::Output

Performs the / operation. Read more
Source§

impl DivAssign for Fraction

Source§

fn div_assign(&mut self, other: Fraction)

Performs the /= operation. Read more
Source§

impl DivAssign<&Fraction> for Fraction

Source§

fn div_assign(&mut self, other: &Fraction)

Performs the /= operation. Read more
Source§

impl DivAssign<&i32> for Fraction

Source§

fn div_assign(&mut self, other: &i32)

Performs the /= operation. Read more
Source§

impl DivAssign<i32> for Fraction

Source§

fn div_assign(&mut self, other: i32)

Performs the /= operation. Read more
Source§

impl Eq for Fraction

Source§

impl From<(i32, i32)> for Fraction

Source§

fn from(x: (i32, i32)) -> Self

Converts to this type from the input type.
Source§

impl From<Fraction> for (i32, i32)

Source§

fn from(f: Fraction) -> Self

Converts to this type from the input type.
Source§

impl From<Fraction> for Rational32

Source§

fn from(x: Fraction) -> Self

Converts to this type from the input type.
Source§

impl From<Fraction> for Value

Source§

fn from(v: Fraction) -> Value

Converts to this type from the input type.
Source§

impl From<Ratio<i32>> for Fraction

Source§

fn from(x: Rational32) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for Fraction

Source§

fn from(x: i32) -> Self

Converts to this type from the input type.
Source§

impl<'a> FromValue<'a> for Fraction

Source§

type Checker = GenericValueTypeChecker<Fraction>

Value type checker.
Source§

unsafe fn from_value(value: &'a Value) -> Self

Get the contained value from a Value. Read more
Source§

impl HasParamSpec for Fraction

Source§

type ParamSpec = ParamSpecFraction

Source§

type SetValue = Fraction

Preferred value to be used as setter for the associated ParamSpec.
Source§

type BuilderFn = for<'a> fn(&'a str) -> ParamSpecFractionBuilder<'a>

Source§

fn param_spec_builder() -> Self::BuilderFn

Source§

impl Hash for Fraction

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Mul for Fraction

Source§

type Output = Fraction

The resulting type after applying the * operator.
Source§

fn mul(self, other: Fraction) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Fraction> for Fraction

Source§

type Output = Fraction

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Fraction) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Fraction> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Fraction) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Fraction> for i32

Source§

type Output = Fraction

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Fraction) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Fraction> for &i32

Source§

type Output = Fraction

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Fraction) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&i32> for Fraction

Source§

type Output = Fraction

The resulting type after applying the * operator.
Source§

fn mul(self, other: &i32) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&i32> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the * operator.
Source§

fn mul(self, other: &i32) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Fraction> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the * operator.
Source§

fn mul(self, other: Fraction) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Fraction> for i32

Source§

type Output = Fraction

The resulting type after applying the * operator.
Source§

fn mul(self, other: Fraction) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Fraction> for &i32

Source§

type Output = Fraction

The resulting type after applying the * operator.
Source§

fn mul(self, other: Fraction) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<i32> for Fraction

Source§

type Output = Fraction

The resulting type after applying the * operator.
Source§

fn mul(self, other: i32) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<i32> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the * operator.
Source§

fn mul(self, other: i32) -> Self::Output

Performs the * operation. Read more
Source§

impl MulAssign for Fraction

Source§

fn mul_assign(&mut self, other: Fraction)

Performs the *= operation. Read more
Source§

impl MulAssign<&Fraction> for Fraction

Source§

fn mul_assign(&mut self, other: &Fraction)

Performs the *= operation. Read more
Source§

impl MulAssign<&i32> for Fraction

Source§

fn mul_assign(&mut self, other: &i32)

Performs the *= operation. Read more
Source§

impl MulAssign<i32> for Fraction

Source§

fn mul_assign(&mut self, other: i32)

Performs the *= operation. Read more
Source§

impl Neg for Fraction

Source§

type Output = Fraction

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Neg for &Fraction

Source§

type Output = Fraction

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Ord for Fraction

Source§

fn cmp(&self, other: &Fraction) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Fraction

Source§

fn eq(&self, other: &Fraction) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Fraction

Source§

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 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Rem for Fraction

Source§

type Output = Fraction

The resulting type after applying the % operator.
Source§

fn rem(self, other: Fraction) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<&Fraction> for Fraction

Source§

type Output = Fraction

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Fraction) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<&Fraction> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Fraction) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<&Fraction> for i32

Source§

type Output = Fraction

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Fraction) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<&Fraction> for &i32

Source§

type Output = Fraction

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Fraction) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<&i32> for Fraction

Source§

type Output = Fraction

The resulting type after applying the % operator.
Source§

fn rem(self, other: &i32) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<&i32> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the % operator.
Source§

fn rem(self, other: &i32) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<Fraction> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the % operator.
Source§

fn rem(self, other: Fraction) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<Fraction> for i32

Source§

type Output = Fraction

The resulting type after applying the % operator.
Source§

fn rem(self, other: Fraction) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<Fraction> for &i32

Source§

type Output = Fraction

The resulting type after applying the % operator.
Source§

fn rem(self, other: Fraction) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<i32> for Fraction

Source§

type Output = Fraction

The resulting type after applying the % operator.
Source§

fn rem(self, other: i32) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<i32> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the % operator.
Source§

fn rem(self, other: i32) -> Self::Output

Performs the % operation. Read more
Source§

impl RemAssign for Fraction

Source§

fn rem_assign(&mut self, other: Fraction)

Performs the %= operation. Read more
Source§

impl RemAssign<&Fraction> for Fraction

Source§

fn rem_assign(&mut self, other: &Fraction)

Performs the %= operation. Read more
Source§

impl RemAssign<&i32> for Fraction

Source§

fn rem_assign(&mut self, other: &i32)

Performs the %= operation. Read more
Source§

impl RemAssign<i32> for Fraction

Source§

fn rem_assign(&mut self, other: i32)

Performs the %= operation. Read more
Source§

impl Serialize for Fraction

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
Source§

impl StaticType for Fraction

Source§

fn static_type() -> Type

Returns the type identifier of Self.
Source§

impl StructuralPartialEq for Fraction

Source§

impl Sub for Fraction

Source§

type Output = Fraction

The resulting type after applying the - operator.
Source§

fn sub(self, other: Fraction) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&Fraction> for Fraction

Source§

type Output = Fraction

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Fraction) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&Fraction> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Fraction) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&Fraction> for i32

Source§

type Output = Fraction

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Fraction) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&Fraction> for &i32

Source§

type Output = Fraction

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Fraction) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&i32> for Fraction

Source§

type Output = Fraction

The resulting type after applying the - operator.
Source§

fn sub(self, other: &i32) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&i32> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the - operator.
Source§

fn sub(self, other: &i32) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<Fraction> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the - operator.
Source§

fn sub(self, other: Fraction) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<Fraction> for i32

Source§

type Output = Fraction

The resulting type after applying the - operator.
Source§

fn sub(self, other: Fraction) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<Fraction> for &i32

Source§

type Output = Fraction

The resulting type after applying the - operator.
Source§

fn sub(self, other: Fraction) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<i32> for Fraction

Source§

type Output = Fraction

The resulting type after applying the - operator.
Source§

fn sub(self, other: i32) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<i32> for &Fraction

Source§

type Output = Fraction

The resulting type after applying the - operator.
Source§

fn sub(self, other: i32) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign for Fraction

Source§

fn sub_assign(&mut self, other: Fraction)

Performs the -= operation. Read more
Source§

impl SubAssign<&Fraction> for Fraction

Source§

fn sub_assign(&mut self, other: &Fraction)

Performs the -= operation. Read more
Source§

impl SubAssign<&i32> for Fraction

Source§

fn sub_assign(&mut self, other: &i32)

Performs the -= operation. Read more
Source§

impl SubAssign<i32> for Fraction

Source§

fn sub_assign(&mut self, other: i32)

Performs the -= operation. Read more
Source§

impl ToValue for Fraction

Source§

fn to_value(&self) -> Value

Convert a value to a Value.
Source§

fn value_type(&self) -> Type

Returns the type identifier of self. Read more
Source§

impl ValueType for Fraction

Source§

type Type = Fraction

Type to get the Type from. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoClosureReturnValue for T
where T: Into<Value>,

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

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>,

Source§

impl<T> Property for T
where T: HasParamSpec,

Source§

type Value = T

Source§

impl<T> PropertyGet for T
where T: HasParamSpec,

Source§

type Value = T

Source§

fn get<R, F>(&self, f: F) -> R
where F: Fn(&<T as PropertyGet>::Value) -> R,

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,

Source§

impl<T> StaticTypeExt for T
where T: StaticType,

Source§

fn ensure_type()

Ensures that the type has been registered with the type system.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToSendValue for T
where T: Send + ToValue + ?Sized,

Source§

fn to_send_value(&self) -> SendValue

Returns a SendValue clone of self.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T> TryFromClosureReturnValue for T
where T: for<'a> FromValue<'a> + StaticType + 'static,

Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.