use geo_types::Point; use num_traits::cast::NumCast; use num_traits::Num; use std::fmt; pub struct PointOnLine where T: Num + NumCast + Copy + PartialEq + PartialOrd + fmt::Debug, { point: Point, index: usize, t: T, } impl PointOnLine where T: Num + NumCast + Copy + PartialEq + PartialOrd + fmt::Debug, { pub fn new(point: Point, index: usize, t: T) -> Self { Self { point, index, t } } pub fn point(&self) -> Point { self.point } pub fn index(&self) -> usize { self.index } pub fn t(&self) -> T { self.t } }