bevy_render::render_resource::encase::vector

Trait FromVectorParts

Source
pub trait FromVectorParts<T, const N: usize>
where T: VectorScalar,
{ // 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 Vec2: From<[f32; 2]>, f32: VectorScalar,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§