IntoVector

Trait IntoVector 

Source
pub trait IntoVector<E, const N: usize>
where E: MatEl,
{ // Required method fn into_vector(self) -> Vector<E, N>; // Provided method fn as_vector(&self) -> Vector<E, N> where Self: Clone { ... } }
Expand description

A trait for types that can be converted into a Vector.

This provides a common interface for various data structures to be transformed into a Vector type.

Required Methods§

Source

fn into_vector(self) -> Vector<E, N>

Consumes the object and converts it into a Vector<E, N>.

Provided Methods§

Source

fn as_vector(&self) -> Vector<E, N>
where Self: Clone,

Creates a Vector<E, N> by cloning the object first.

This is a convenience method that allows conversion without consuming the original object, for types that implement Clone.

Implementors§

Source§

impl<T, E, const N: usize> IntoVector<E, N> for T
where E: MatEl, T: IntoArray<E, N>,