encase::vector

Trait FromVectorParts

Source
pub trait FromVectorParts<T: VectorScalar, const N: usize> {
    // Required method
    fn from_parts(parts: [T; N]) -> Self;
}
Expand description

Enables the creation of a vector (via [T; N])

Required Methods§

Source

fn from_parts(parts: [T; N]) -> Self

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.

Implementations on Foreign Types§

Source§

impl FromVectorParts<f32, 2> for Vec2
where Self: From<[f32; 2]>, f32: VectorScalar,

Source§

fn from_parts(parts: [f32; 2]) -> Self

Source§

impl FromVectorParts<f32, 3> for Vec3
where Self: From<[f32; 3]>, f32: VectorScalar,

Source§

fn from_parts(parts: [f32; 3]) -> Self

Source§

impl FromVectorParts<f32, 4> for Vec4
where Self: From<[f32; 4]>, f32: VectorScalar,

Source§

fn from_parts(parts: [f32; 4]) -> Self

Source§

impl FromVectorParts<i32, 2> for IVec2
where Self: From<[i32; 2]>, i32: VectorScalar,

Source§

fn from_parts(parts: [i32; 2]) -> Self

Source§

impl FromVectorParts<i32, 3> for IVec3
where Self: From<[i32; 3]>, i32: VectorScalar,

Source§

fn from_parts(parts: [i32; 3]) -> Self

Source§

impl FromVectorParts<i32, 4> for IVec4
where Self: From<[i32; 4]>, i32: VectorScalar,

Source§

fn from_parts(parts: [i32; 4]) -> Self

Source§

impl FromVectorParts<u32, 2> for UVec2
where Self: From<[u32; 2]>, u32: VectorScalar,

Source§

fn from_parts(parts: [u32; 2]) -> Self

Source§

impl FromVectorParts<u32, 3> for UVec3
where Self: From<[u32; 3]>, u32: VectorScalar,

Source§

fn from_parts(parts: [u32; 3]) -> Self

Source§

impl FromVectorParts<u32, 4> for UVec4
where Self: From<[u32; 4]>, u32: VectorScalar,

Source§

fn from_parts(parts: [u32; 4]) -> Self

Implementors§