pub fn new(numerator: u64, denominator: u64) -> Result<Self, Error> {
        if numerator >= denominator {
            return Err(Error::trust_threshold_too_large());
        }
        if denominator == 0 {
            return Err(Error::undefined_trust_threshold());
        }
        if 3 * numerator < denominator {
            return Err(Error::trust_threshold_too_small());
        }
        Ok(Self {
            numerator,
            denominator,
        })
    }
/// Instantiate a TrustThresholdFraction if the given denominator and
/// numerator are valid.
///
/// The parameters are valid iff `1/3 <= numerator/denominator < 1`.
/// In any other case we return an error.
Instantiate a TrustThresholdFraction if the given denominator and
numerator are valid.

The parameters are valid iff `1/3 <= numerator/denominator < 1`.
In any other case we return an error.
Instantiate a TrustThresholdFraction if the given denominator and numerator are valid . The parameters are valid iff ` 1 / 3 < = numerator / denominator < 1 ` . In any other case we return an error .
pub fn new(numerator: u64, denominator: u64) -> Result<Self, Error> {
        if numerator >= denominator {
            return Err(Error::trust_threshold_too_large());
        }
        if denominator == 0 {
            return Err(Error::undefined_trust_threshold());
        }
        if 3 * numerator < denominator {
            return Err(Error::trust_threshold_too_small());
        }
        Ok(Self {
            numerator,
            denominator,
        })
    }
pub fn new ( numerator : u64 , denominator : u64 ) -> Result < Self , Error > { if numerator >= denominator { return Err ( Error :: trust_threshold_too_large ( ) ) ; } if denominator == 0 { return Err ( Error :: undefined_trust_threshold ( ) ) ; } if 3 * numerator < denominator { return Err ( Error :: trust_threshold_too_small ( ) ) ; } Ok ( Self { numerator , denominator , } ) }
Instantiate a TrustThresholdFraction if the given denominator and
numerator are valid.
Instantiate a TrustThresholdFraction if the given denominator and numerator are valid .
numerator
u64
denominator
u64