pub trait Averageable:
Copy
+ Default
+ Debug
+ AddAssign
+ Div<Output = Self> {
// Required method
fn from_count(count: usize) -> Self;
}Expand description
Trait for types that can be used with RunningAverage.
Provides conversion from a usize count, needed to compute the average.
Implemented for all standard numeric primitives.
Required Methods§
Sourcefn from_count(count: usize) -> Self
fn from_count(count: usize) -> Self
Convert a usize count to Self.
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.