Skip to main content

HaveZAndOne

Trait HaveZAndOne 

Source
pub trait HaveZAndOne<T>: HaveZ<T> {
    const Z: Self;
    const FORWARD: Self = Self::Z;

    // Provided methods
    fn forward(self) -> Self
       where Self: Add<Output = Self> { ... }
    fn backward(self) -> Self
       where Self: Sub<Output = Self> { ... }
}

Required Associated Constants§

Source

const Z: Self

Provided Associated Constants§

Source

const FORWARD: Self = Self::Z

+ Z

Provided Methods§

Source

fn forward(self) -> Self
where Self: Add<Output = Self>,

+ Z

Source

fn backward(self) -> Self
where Self: Sub<Output = Self>,

- Z

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<T> HaveZAndOne<T> for Vector<T, 3>
where T: One + Zero,

Source§

const Z: Vector<T, 3>

Source§

impl<T> HaveZAndOne<T> for Vector<T, 4>
where T: One + Zero,

Source§

const Z: Vector<T, 4>