pub trait DataPoint:
Copy
+ Clone
+ PartialEq {
type X: PartialOrd + Copy + Clone;
type Y: PartialOrd + Copy + Clone;
// Required methods
fn x(&self) -> Self::X;
fn y(&self) -> Self::Y;
fn new(x: Self::X, y: Self::Y) -> Self;
}Expand description
Trait for data points that can be used in charts
Required Associated Types§
Sourcetype X: PartialOrd + Copy + Clone
type X: PartialOrd + Copy + Clone
The type of the X coordinate
Sourcetype Y: PartialOrd + Copy + Clone
type Y: PartialOrd + Copy + Clone
The type of the Y coordinate
Required 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.