Skip to main content

X2CanonicalInterface

Trait X2CanonicalInterface 

Source
pub trait X2CanonicalInterface: Sized + X2BasicInterface {
Show 17 methods // Required methods fn _0_ref(&self) -> &Self::Scalar; fn _1_ref(&self) -> &Self::Scalar; fn _0_mut(&mut self) -> &mut Self::Scalar; fn _1_mut(&mut self) -> &mut Self::Scalar; fn as_canonical(&self) -> &X2<Self::Scalar>; fn as_canonical_mut(&mut self) -> &mut X2<Self::Scalar>; // Provided methods fn assign<Src>(&mut self, src: Src) where Src: X2BasicInterface<Scalar = Self::Scalar> { ... } fn x_ref(&self) -> &Self::Scalar { ... } fn y_ref(&self) -> &Self::Scalar { ... } fn x_mut(&mut self) -> &mut Self::Scalar { ... } fn y_mut(&mut self) -> &mut Self::Scalar { ... } fn as_tuple(&self) -> &(Self::Scalar, Self::Scalar) { ... } fn as_array(&self) -> &[Self::Scalar; 2] { ... } fn as_slice(&self) -> &[Self::Scalar] { ... } fn as_tuple_mut(&mut self) -> &mut (Self::Scalar, Self::Scalar) { ... } fn as_array_mut(&mut self) -> &mut [Self::Scalar; 2] { ... } fn as_slice_mut(&mut self) -> &mut [Self::Scalar] { ... }
}
Expand description

Interface of vector X2 for structures with the canonical layout.

Required Methods§

Source

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

First element.

Source

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

Second element.

Source

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

First element.

Source

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

Second element.

Source

fn as_canonical(&self) -> &X2<Self::Scalar>

Canonical representation of the vector.

Source

fn as_canonical_mut(&mut self) -> &mut X2<Self::Scalar>

Mutable canonical representation of the vector.

Provided Methods§

Source

fn assign<Src>(&mut self, src: Src)
where Src: X2BasicInterface<Scalar = Self::Scalar>,

Assign value.

Source

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

First element.

Source

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

Second element.

Source

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

First element.

Source

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

Second element.

Source

fn as_tuple(&self) -> &(Self::Scalar, Self::Scalar)

Interpret as tuple.

Source

fn as_array(&self) -> &[Self::Scalar; 2]

Interpret as array.

Source

fn as_slice(&self) -> &[Self::Scalar]

Interpret as slice.

Source

fn as_tuple_mut(&mut self) -> &mut (Self::Scalar, Self::Scalar)

Interpret as mutable tuple.

Source

fn as_array_mut(&mut self) -> &mut [Self::Scalar; 2]

Interpret as mutable array.

Source

fn as_slice_mut(&mut self) -> &mut [Self::Scalar]

Interpret as mutable slice.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<Scalar> X2CanonicalInterface for [Scalar; 2]
where Scalar: ScalarInterface,

Source§

impl<Scalar> X2CanonicalInterface for (Scalar, Scalar)
where Scalar: ScalarInterface,

Implementors§

Source§

impl<Scalar> X2CanonicalInterface for X2<Scalar>
where Scalar: ScalarInterface,