pub trait FromComponents<Unit>: Sized {
    // Required method
    fn from_components(components: (Unit, Unit)) -> Self;

    // Provided method
    fn from_vec<Type>(other: Type) -> Self
       where Type: IntoComponents<Unit> { ... }
}
Expand description

Converts from a 2d vector in tuple form

Required Methods§

source

fn from_components(components: (Unit, Unit)) -> Self

Returns a new instance from the 2d vector components provided.

Provided Methods§

source

fn from_vec<Type>(other: Type) -> Selfwhere Type: IntoComponents<Unit>,

Converts this type to another type using FromComponents and IntoComponents.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

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

source§

fn from_components(components: Self) -> Self

Implementors§

source§

impl<Unit> FromComponents<Unit> for Point<Unit>

source§

impl<Unit> FromComponents<Unit> for Size<Unit>