pub trait ApproxEq: Sized {
type Margin: Copy + Default;
// Required method
fn approx_eq<M: Into<Self::Margin>>(self, other: Self, margin: M) -> bool;
// Provided method
fn approx_ne<M: Into<Self::Margin>>(self, other: Self, margin: M) -> bool { ... }
}
Expand description
A trait for approximate equality comparisons.
Required Associated Types§
Required Methods§
Provided Methods§
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.