NearestPoint

Trait NearestPoint 

Source
pub trait NearestPoint<M: Clone + Default> {
    // Required methods
    fn nearest_point<M2: Clone + Default>(
        &self,
        b: &VectorPoint<M2>,
    ) -> Option<&VectorPoint<M>>;
    fn nearest_point_mut<M2: Clone + Default>(
        &mut self,
        b: &VectorPoint<M2>,
    ) -> Option<&mut VectorPoint<M>>;
}
Expand description

Required Methods§

Source

fn nearest_point<M2: Clone + Default>( &self, b: &VectorPoint<M2>, ) -> Option<&VectorPoint<M>>

Get the nearest of a collection of VectorPoint

Source

fn nearest_point_mut<M2: Clone + Default>( &mut self, b: &VectorPoint<M2>, ) -> Option<&mut VectorPoint<M>>

Get the mutable nearest of a collection of VectorPoint

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.

Implementations on Foreign Types§

Source§

impl<M, P: Clone + Default, D: Clone + Default> NearestPoint<D> for VectorFeature<M, P, D>

Source§

fn nearest_point<M2: Clone + Default>( &self, b: &VectorPoint<M2>, ) -> Option<&VectorPoint<D>>

Source§

fn nearest_point_mut<M2: Clone + Default>( &mut self, b: &VectorPoint<M2>, ) -> Option<&mut VectorPoint<D>>

Source§

impl<M: Clone + Default> NearestPoint<M> for VectorGeometry<M>

Source§

fn nearest_point<M2: Clone + Default>( &self, b: &VectorPoint<M2>, ) -> Option<&VectorPoint<M>>

Source§

fn nearest_point_mut<M2: Clone + Default>( &mut self, b: &VectorPoint<M2>, ) -> Option<&mut VectorPoint<M>>

Source§

impl<M: Clone + Default> NearestPoint<M> for VectorPoint<M>

Source§

fn nearest_point<M2: Clone + Default>( &self, _b: &VectorPoint<M2>, ) -> Option<&VectorPoint<M>>

Source§

fn nearest_point_mut<M2: Clone + Default>( &mut self, _b: &VectorPoint<M2>, ) -> Option<&mut VectorPoint<M>>

Source§

impl<M: Clone + Default> NearestPoint<M> for VectorMultiLineString<M>

Source§

fn nearest_point<M2: Clone + Default>( &self, b: &VectorPoint<M2>, ) -> Option<&VectorPoint<M>>

Source§

fn nearest_point_mut<M2: Clone + Default>( &mut self, b: &VectorPoint<M2>, ) -> Option<&mut VectorPoint<M>>

Source§

impl<M: Clone + Default> NearestPoint<M> for VectorMultiLineStringGeometry<M>

Source§

fn nearest_point<M2: Clone + Default>( &self, b: &VectorPoint<M2>, ) -> Option<&VectorPoint<M>>

Source§

fn nearest_point_mut<M2: Clone + Default>( &mut self, b: &VectorPoint<M2>, ) -> Option<&mut VectorPoint<M>>

Source§

impl<M: Clone + Default> NearestPoint<M> for VectorMultiPoint<M>

Source§

fn nearest_point<M2: Clone + Default>( &self, b: &VectorPoint<M2>, ) -> Option<&VectorPoint<M>>

Source§

fn nearest_point_mut<M2: Clone + Default>( &mut self, b: &VectorPoint<M2>, ) -> Option<&mut VectorPoint<M>>

Source§

impl<M: Clone + Default> NearestPoint<M> for VectorMultiPointGeometry<M>

Source§

fn nearest_point<M2: Clone + Default>( &self, b: &VectorPoint<M2>, ) -> Option<&VectorPoint<M>>

Source§

fn nearest_point_mut<M2: Clone + Default>( &mut self, b: &VectorPoint<M2>, ) -> Option<&mut VectorPoint<M>>

Source§

impl<M: Clone + Default> NearestPoint<M> for VectorMultiPolygon<M>

Source§

fn nearest_point<M2: Clone + Default>( &self, b: &VectorPoint<M2>, ) -> Option<&VectorPoint<M>>

Source§

fn nearest_point_mut<M2: Clone + Default>( &mut self, b: &VectorPoint<M2>, ) -> Option<&mut VectorPoint<M>>

Source§

impl<M: Clone + Default> NearestPoint<M> for VectorMultiPolygonGeometry<M>

Source§

fn nearest_point<M2: Clone + Default>( &self, b: &VectorPoint<M2>, ) -> Option<&VectorPoint<M>>

Source§

fn nearest_point_mut<M2: Clone + Default>( &mut self, b: &VectorPoint<M2>, ) -> Option<&mut VectorPoint<M>>

Source§

impl<M: Clone + Default> NearestPoint<M> for VectorPointGeometry<M>

Source§

fn nearest_point<M2: Clone + Default>( &self, b: &VectorPoint<M2>, ) -> Option<&VectorPoint<M>>

Source§

fn nearest_point_mut<M2: Clone + Default>( &mut self, b: &VectorPoint<M2>, ) -> Option<&mut VectorPoint<M>>

Implementors§