Trait ArrayLikeExtension

Source
pub trait ArrayLikeExtension<T, const N: usize>: ArrayLike<T, N> {
Show 36 methods // Provided methods fn min_element(&self) -> &T where T: PartialOrd { ... } fn max_element(&self) -> &T where T: PartialOrd { ... } fn min_element_idx(&self) -> usize where T: PartialOrd { ... } fn max_element_idx(&self) -> usize where T: PartialOrd { ... } fn to_array_1d(self) -> [T; 1] where T: Default { ... } fn to_array_1d_filled(self, fill: T) -> [T; 1] where T: Clone { ... } fn to_array_2d(self) -> [T; 2] where T: Default { ... } fn to_array_2d_filled(self, fill: T) -> [T; 2] where T: Clone { ... } fn to_array_3d(self) -> [T; 3] where T: Default { ... } fn to_array_3d_filled(self, fill: T) -> [T; 3] where T: Clone { ... } fn to_array_4d(self) -> [T; 4] where T: Default { ... } fn to_array_4d_filled(self, fill: T) -> [T; 4] where T: Clone { ... } fn to_point1(self) -> Point1 where int: From<T>, T: Default { ... } fn to_point2(self) -> Point2 where int: From<T>, T: Default { ... } fn to_point3(self) -> Point3 where int: From<T>, T: Default { ... } fn to_point4(self) -> Point4 where int: From<T>, T: Default { ... } fn to_point1_filled(self, fill: int) -> Point1 where int: From<T> { ... } fn to_point2_filled(self, fill: int) -> Point2 where int: From<T> { ... } fn to_point3_filled(self, fill: int) -> Point3 where int: From<T> { ... } fn to_point4_filled(self, fill: int) -> Point4 where int: From<T> { ... } fn to_vec1(self) -> Vec1 where float: From<T>, T: Default { ... } fn to_vec2(self) -> Vec2 where float: From<T>, T: Default { ... } fn to_vec3(self) -> Vec3 where float: From<T>, T: Default { ... } fn to_vec4(self) -> Vec4 where float: From<T>, T: Default { ... } fn to_vec1_filled(self, fill: float) -> Vec1 where float: From<T> { ... } fn to_vec2_filled(self, fill: float) -> Vec2 where float: From<T> { ... } fn to_vec3_filled(self, fill: float) -> Vec3 where float: From<T> { ... } fn to_vec4_filled(self, fill: float) -> Vec4 where float: From<T> { ... } fn to_vector1(self) -> Vector1<T> where T: Default { ... } fn to_vector2(self) -> Vector2<T> where T: Default { ... } fn to_vector3(self) -> Vector3<T> where T: Default { ... } fn to_vector4(self) -> Vector4<T> where T: Default { ... } fn to_vector1_filled(self, fill: T) -> Vector1<T> where T: Clone { ... } fn to_vector2_filled(self, fill: T) -> Vector2<T> where T: Clone { ... } fn to_vector3_filled(self, fill: T) -> Vector3<T> where T: Clone { ... } fn to_vector4_filled(self, fill: T) -> Vector4<T> where T: Clone { ... }
}

Provided Methods§

Source

fn min_element(&self) -> &T
where T: PartialOrd,

Source

fn max_element(&self) -> &T
where T: PartialOrd,

Source

fn min_element_idx(&self) -> usize
where T: PartialOrd,

Source

fn max_element_idx(&self) -> usize
where T: PartialOrd,

Source

fn to_array_1d(self) -> [T; 1]
where T: Default,

Fill non existing component with Default

Source

fn to_array_1d_filled(self, fill: T) -> [T; 1]
where T: Clone,

Fill non existing component with the Cloned given value

Source

fn to_array_2d(self) -> [T; 2]
where T: Default,

Fill non existing component with Default

Source

fn to_array_2d_filled(self, fill: T) -> [T; 2]
where T: Clone,

Fill non existing component with the Cloned given value

Source

fn to_array_3d(self) -> [T; 3]
where T: Default,

Fill non existing component with Default

Source

fn to_array_3d_filled(self, fill: T) -> [T; 3]
where T: Clone,

Fill non existing component with the Cloned given value

Source

fn to_array_4d(self) -> [T; 4]
where T: Default,

Fill non existing component with Default

Source

fn to_array_4d_filled(self, fill: T) -> [T; 4]
where T: Clone,

Fill non existing component with the Cloned given value

Source

fn to_point1(self) -> Point1
where int: From<T>, T: Default,

Fill non existing component with Default

Source

fn to_point2(self) -> Point2
where int: From<T>, T: Default,

Fill non existing component with Default

Source

fn to_point3(self) -> Point3
where int: From<T>, T: Default,

Fill non existing component with Default

Source

fn to_point4(self) -> Point4
where int: From<T>, T: Default,

Fill non existing component with Default

Source

fn to_point1_filled(self, fill: int) -> Point1
where int: From<T>,

Fill non existing component with the given value

Source

fn to_point2_filled(self, fill: int) -> Point2
where int: From<T>,

Fill non existing component with the given value

Source

fn to_point3_filled(self, fill: int) -> Point3
where int: From<T>,

Fill non existing component with the given value

Source

fn to_point4_filled(self, fill: int) -> Point4
where int: From<T>,

Fill non existing component with the given value

Source

fn to_vec1(self) -> Vec1
where float: From<T>, T: Default,

Fill non existing component with Default

Source

fn to_vec2(self) -> Vec2
where float: From<T>, T: Default,

Fill non existing component with Default

Source

fn to_vec3(self) -> Vec3
where float: From<T>, T: Default,

Fill non existing component with Default

Source

fn to_vec4(self) -> Vec4
where float: From<T>, T: Default,

Fill non existing component with Default

Source

fn to_vec1_filled(self, fill: float) -> Vec1
where float: From<T>,

Fill non existing component with the given value

Source

fn to_vec2_filled(self, fill: float) -> Vec2
where float: From<T>,

Fill non existing component with the given value

Source

fn to_vec3_filled(self, fill: float) -> Vec3
where float: From<T>,

Fill non existing component with the given value

Source

fn to_vec4_filled(self, fill: float) -> Vec4
where float: From<T>,

Fill non existing component with the given value

Source

fn to_vector1(self) -> Vector1<T>
where T: Default,

Fill non existing component with Default

Source

fn to_vector2(self) -> Vector2<T>
where T: Default,

Fill non existing component with Default

Source

fn to_vector3(self) -> Vector3<T>
where T: Default,

Fill non existing component with Default

Source

fn to_vector4(self) -> Vector4<T>
where T: Default,

Fill non existing component with Default

Source

fn to_vector1_filled(self, fill: T) -> Vector1<T>
where T: Clone,

Fill non existing component with the given value

Source

fn to_vector2_filled(self, fill: T) -> Vector2<T>
where T: Clone,

Fill non existing component with the given value

Source

fn to_vector3_filled(self, fill: T) -> Vector3<T>
where T: Clone,

Fill non existing component with the given value

Source

fn to_vector4_filled(self, fill: T) -> Vector4<T>
where T: Clone,

Fill non existing component with the given value

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<S, T, const N: usize> ArrayLikeExtension<T, N> for S
where S: ArrayLike<T, N>,