Trait XVec

Source
pub trait XVec: VecN {
    // Required methods
    fn x(&self) -> Self::Scalar;
    fn x_mut(&mut self) -> &mut Self::Scalar;

    // Provided method
    fn set_x(&mut self, x: Self::Scalar) { ... }
}
Expand description

Trait for vectors with an X dimension

Required Methods§

Source

fn x(&self) -> Self::Scalar

Get the value of the dimension

Source

fn x_mut(&mut self) -> &mut Self::Scalar

Get a mutable reference to the value of the dimension

Provided Methods§

Source

fn set_x(&mut self, x: Self::Scalar)

Set the value of the dimension

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§

Source§

impl<V> XVec for V
where V: VecN,