pub trait Enlargeable:
Sized
+ Bounded
+ NumCast
+ Copy {
type Larger: Copy + NumCast + Num + PartialOrd<Self::Larger> + Clone + Bounded + AddAssign + Zero;
// Provided methods
fn clamp_larger(n: Self::Larger) -> Self { ... }
fn make_larger(self) -> Self::Larger { ... }
}Expand description
An Enlargable::Larger value should be enough to calculate
the sum (average) of a few hundred or thousand Enlargeable values.
Required Associated Types§
Provided Methods§
Sourcefn clamp_larger(n: Self::Larger) -> Self
fn clamp_larger(n: Self::Larger) -> Self
Clamp a larger value to the range of the smaller type.
Sourcefn make_larger(self) -> Self::Larger
fn make_larger(self) -> Self::Larger
Convert the value to a larger type.
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.