Trait Addressable

Source
pub trait Addressable:
    PartialEq
    + Ord
    + Sized
    + Copy {
    // Required methods
    fn get_dimension_count() -> u32;
    fn new_from_value_vec(values: Vec<i64>) -> Self;
    fn get_item_at_dimension_index(&self, dimension_index: u32) -> &i64;

    // Provided methods
    fn add(&self, other: &Self) -> Self { ... }
    fn subtract(&self, other: &Self) -> Self { ... }
    fn difference(&self, other: &Self) -> Self { ... }
    fn distance(&self, other: &Self) -> f64 { ... }
    fn scale(&self, scalar: i64) -> Self { ... }
}

Required Methods§

Source

fn get_dimension_count() -> u32

Source

fn new_from_value_vec(values: Vec<i64>) -> Self

Source

fn get_item_at_dimension_index(&self, dimension_index: u32) -> &i64

Provided Methods§

Source

fn add(&self, other: &Self) -> Self

Source

fn subtract(&self, other: &Self) -> Self

Source

fn difference(&self, other: &Self) -> Self

Source

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

Source

fn scale(&self, scalar: i64) -> Self

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.

Implementors§