pub trait ApproxEq<U: LowerExp, T: LowerExp>: LowerExp {
// Required method
fn approx_eq(&self, other: &U, tolerance: &T) -> bool;
// Provided methods
fn approx_eq_slice(lhs: &[Self], rhs: &[U], tolerance: &T) -> bool
where Self: Sized { ... }
fn approx_eq_iterator<'a, I, J>(lhs: I, rhs: J, tolerance: &'a T) -> bool
where Self: Sized + 'a,
U: 'a,
I: IntoIterator<Item = &'a Self>,
J: IntoIterator<Item = &'a U> { ... }
fn assert_approx_eq(&self, other: &U, tolerance: &T) { ... }
fn approx_eq_res(&self, other: &U, tolerance: &T) -> Result<()> { ... }
}Required Methods§
Provided Methods§
fn approx_eq_slice(lhs: &[Self], rhs: &[U], tolerance: &T) -> boolwhere
Self: Sized,
fn approx_eq_iterator<'a, I, J>(lhs: I, rhs: J, tolerance: &'a T) -> bool
fn assert_approx_eq(&self, other: &U, tolerance: &T)
fn approx_eq_res(&self, other: &U, tolerance: &T) -> Result<()>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".