pub trait BoundedNumber {
const TYPE_DESCRIPTION: &'static str;
const MIN: Option<f64> = None;
const MAX: Option<f64> = None;
const DEFAULT: Option<f64> = None;
// Required methods
fn get(&self) -> f64;
fn new(value: f64) -> Result<Self, BoundedNumberError>
where Self: Sized;
// Provided method
fn validate(value: f64) -> Result<(), BoundedNumberError> { ... }
}Required Associated Constants§
const TYPE_DESCRIPTION: &'static str
Provided Associated Constants§
const MIN: Option<f64> = None
const MAX: Option<f64> = None
const DEFAULT: Option<f64> = None
Required Methods§
fn get(&self) -> f64
fn new(value: f64) -> Result<Self, BoundedNumberError>where
Self: Sized,
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".