Skip to main content

IsBuildableND

Trait IsBuildableND 

Source
pub trait IsBuildableND: Sized + IsND {
    // Required methods
    fn new_nd(coords: &[f64]) -> Result<Self>;
    fn from_nd<P>(&mut self, other: P) -> Result<()>
       where P: IsBuildableND;

    // Provided methods
    fn zero_nd() -> Result<Self> { ... }
    fn center_nd<P>(&self, other: &P, buffer: &mut Vec<f64>) -> Result<Self>
       where P: IsND { ... }
}
Expand description

IsBuildableND is a trait used for types which are positioned in n-dimensional space and can be constructed

Required Methods§

Source

fn new_nd(coords: &[f64]) -> Result<Self>

Should build an object from the correct number of coordinates

Source

fn from_nd<P>(&mut self, other: P) -> Result<()>
where P: IsBuildableND,

Should use the coordinates of another as its own

Provided Methods§

Source

fn zero_nd() -> Result<Self>

Returns a new object with 0 for all coordinates

Source

fn center_nd<P>(&self, other: &P, buffer: &mut Vec<f64>) -> Result<Self>
where P: IsND,

Returns the center between this and other

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§