pub trait Fraction<T>: Sized {
// Required methods
fn numerator(&self) -> T;
fn denominator(&self) -> T;
fn inv(&self) -> Option<Self>;
}Expand description
A fraction p/q with integers p and q.
p is called the numerator and q is called the denominator.
Required Methods§
Sourcefn denominator(&self) -> T
fn denominator(&self) -> T
Returns the denominator q
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.