use core::num::Wrapping; use core::{f32, f64}; use core::{i128, i16, i32, i64, i8, isize}; use core::{u128, u16, u32, u64, u8, usize};
/// Numbers which have upper and lower bounds pubtrait Bounded { // FIXME (#5527): These should be associated constants /// Returns the smallest finite number this type can represent fn min_value() -> Self; /// Returns the largest finite number this type can represent fn max_value() -> Self;
}
/// Numbers which have lower bounds pubtrait LowerBounded { /// Returns the smallest finite number this type can represent fn min_value() -> Self;
}
// FIXME: With a major version bump, this should be a supertrait instead impl<T: Bounded> LowerBounded for T { fn min_value() -> T {
Bounded::min_value()
}
}
/// Numbers which have upper bounds pubtrait UpperBounded { /// Returns the largest finite number this type can represent fn max_value() -> Self;
}
// FIXME: With a major version bump, this should be a supertrait instead impl<T: Bounded> UpperBounded for T { fn max_value() -> T {
Bounded::max_value()
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.