pub trait Cartesian {
// Required methods
fn x(&self) -> f64;
fn y(&self) -> f64;
// Provided methods
fn distance<T: Cartesian + ?Sized>(&self, other: &T) -> f64 { ... }
fn delta<T: Address + Clone + Cartesian + Sync + Send>(
&self,
others: &[T],
min: f64,
) -> AddressDeltas
where Self: Address + Cartesian + Sized + Clone + Send + Sync { ... }
fn deltas<T: Cartesian + Address + Clone + Sync + Send, U: Cartesian + Address + Clone + Sync + Send>(
values: &[T],
other: &[U],
min: f64,
) -> AddressDeltas { ... }
}Expand description
The type can produce cartesian coordinates.
Required Methods§
Provided Methods§
Sourcefn distance<T: Cartesian + ?Sized>(&self, other: &T) -> f64
fn distance<T: Cartesian + ?Sized>(&self, other: &T) -> f64
The distance function returns the distance between a point self and another point
other in the same unit as self.
Sourcefn delta<T: Address + Clone + Cartesian + Sync + Send>(
&self,
others: &[T],
min: f64,
) -> AddressDeltas
fn delta<T: Address + Clone + Cartesian + Sync + Send>( &self, others: &[T], min: f64, ) -> AddressDeltas
Distance between address and other addresses with matching label.
Iterates through records of others, calculates the distance from self
to matching addresses in others, collects the results into a vector and
returns the results in the records field of a new AddressDeltas struct.
Sourcefn deltas<T: Cartesian + Address + Clone + Sync + Send, U: Cartesian + Address + Clone + Sync + Send>(
values: &[T],
other: &[U],
min: f64,
) -> AddressDeltas
fn deltas<T: Cartesian + Address + Clone + Sync + Send, U: Cartesian + Address + Clone + Sync + Send>( values: &[T], other: &[U], min: f64, ) -> AddressDeltas
Distance between addresses and other addresses with matching label.
Iterates through records of others, calculates the distance from self
to matching addresses in others, collects the results into a vector and
returns the results in the records field of a new AddressDeltas struct. Calls
[Point::delta].
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.