pub trait Measure: Copy {
// Required methods
fn zero() -> Self;
fn checked_add(self, other: Self) -> Option<Self>;
fn compare(self, other: Self) -> Option<Ordering>;
// Provided methods
fn is_negative(self) -> bool { ... }
fn is_valid(self) -> bool { ... }
}Expand description
Ordered path cost with checked addition.
Implementations must return a consistent total order for valid values.
Required Methods§
fn zero() -> Self
fn checked_add(self, other: Self) -> Option<Self>
fn compare(self, other: Self) -> Option<Ordering>
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".