pub trait MaybeExact {
type Approximate;
type Exact;
// Required methods
fn is_exact(&self) -> bool;
fn extract_approx(&self) -> Result<Self::Approximate>;
fn extract_exact(&self) -> Result<&Self::Exact>;
}Required Associated Types§
type Approximate
type Exact
Required Methods§
fn is_exact(&self) -> bool
Sourcefn extract_approx(&self) -> Result<Self::Approximate>
fn extract_approx(&self) -> Result<Self::Approximate>
This is a low-level function to extract an f64. Will only succeed if the fraction is approximate.
Sourcefn extract_exact(&self) -> Result<&Self::Exact>
fn extract_exact(&self) -> Result<&Self::Exact>
This is a low-level function to extract an exact value. Will only succeed if the fraction is exact.