pub trait Numbers {
// Required methods
fn number(&self, path: &str) -> Result<f64, ConfigError>;
fn invalid(&self, path: &str) -> ConfigError;
// Provided methods
fn positive(&self, path: &str) -> Result<f64, ConfigError> { ... }
fn non_negative(&self, path: &str) -> Result<f64, ConfigError> { ... }
}Expand description
Where a linkage reads its numbers: a crate’s tables by their paths (geometry.forearm_m), or a file’s linkage node
by the path’s last part (forearm_m), so that one constructor serves both.
Required Methods§
Provided Methods§
fn positive(&self, path: &str) -> Result<f64, ConfigError>
fn non_negative(&self, path: &str) -> Result<f64, ConfigError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".