pub trait Point: Copy {
type Scalar: Scalar;
type Vector: Vector<Scalar = Self::Scalar>;
// Required methods
fn displacement(self, other: Self) -> Self::Vector;
fn translate(self, v: Self::Vector) -> Self;
// Provided method
fn distance(self, other: Self) -> Self::Scalar { ... }
}Expand description
Required Associated Types§
Required Methods§
Sourcefn displacement(self, other: Self) -> Self::Vector
fn displacement(self, other: Self) -> Self::Vector
Displacement from self to other (i.e. other - self).
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.