IntoComponents

Trait IntoComponents 

Source
pub trait IntoComponents<Unit>: Sized {
    // Required method
    fn into_components(self) -> (Unit, Unit);

    // Provided method
    fn to_vec<Type>(self) -> Type
       where Type: FromComponents<Unit> { ... }
}
Expand description

Converts to a 2d vector in tuple form

Required Methods§

Source

fn into_components(self) -> (Unit, Unit)

Extracts this type’s 2d vector components.

Provided Methods§

Source

fn to_vec<Type>(self) -> Type
where Type: FromComponents<Unit>,

Converts this type to another type using FromComponents and IntoComponents.

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 IntoComponents<Lp> for f32

Source§

impl IntoComponents<Lp> for i32

Source§

impl IntoComponents<Px> for f32

Source§

impl IntoComponents<Px> for i32

Source§

impl IntoComponents<UPx> for f32

Source§

impl IntoComponents<UPx> for u32

Source§

impl<Unit> IntoComponents<Unit> for (Unit, Unit)

Source§

fn into_components(self) -> Self

Implementors§

Source§

impl<Unit> IntoComponents<Unit> for Point<Unit>

Source§

impl<Unit> IntoComponents<Unit> for Size<Unit>

Source§

impl<Unit> IntoComponents<Unit> for Unit
where Unit: Copy,