pub trait MetricSpace<S>: Sized {
// Required method
fn distance_squared(self, other: Self) -> S;
// Provided method
fn distance(self, other: Self) -> S
where S: Sqrt { ... }
}Expand description
Set of points with distance function
Required Methods§
fn distance_squared(self, other: Self) -> S
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.