Skip to main content

Distance

Trait Distance 

Source
pub trait Distance {
    // Required method
    fn distance(&self, other: &Self) -> f64;
}

Required Methods§

Source

fn distance(&self, other: &Self) -> f64

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 Distance for f32

Source§

fn distance(&self, other: &f32) -> f64

Source§

impl Distance for f64

Source§

fn distance(&self, other: &f64) -> f64

Source§

impl Distance for i8

Source§

fn distance(&self, other: &i8) -> f64

Source§

impl Distance for i16

Source§

fn distance(&self, other: &i16) -> f64

Source§

impl Distance for i32

Source§

fn distance(&self, other: &i32) -> f64

Source§

impl Distance for i64

Source§

fn distance(&self, other: &i64) -> f64

Source§

impl Distance for isize

Source§

fn distance(&self, other: &isize) -> f64

Source§

impl Distance for u8

Source§

fn distance(&self, other: &u8) -> f64

Source§

impl Distance for u16

Source§

fn distance(&self, other: &u16) -> f64

Source§

impl Distance for u32

Source§

fn distance(&self, other: &u32) -> f64

Source§

impl Distance for u64

Source§

fn distance(&self, other: &u64) -> f64

Source§

impl Distance for usize

Source§

fn distance(&self, other: &usize) -> f64

Source§

impl Distance for String

Source§

fn distance(&self, other: &String) -> f64

Implementors§