Trait rect_iter::FromTuple2 [] [src]

pub trait FromTuple2<T> {
    fn from_tuple2(tuple: (T, T)) -> Self;
}

To manipulate many Point libraries in the same way, we use tuple as entry points of API.

Example

use rect_iter::FromTuple2;
struct Point {
    x: f64,
    y: f64,
}
impl FromTuple2<f64> for Point {
    fn from_tuple2(t: (f64, f64)) -> Self {
        Point { x: t.0, y: t.1 }
    }
}

Required Methods

Implementations on Foreign Types

impl<T: Copy, U> FromTuple2<T> for TypedPoint2D<T, U>
[src]

[src]

impl<T: Clone, U> FromTuple2<T> for TypedVector2D<T, U>
[src]

[src]

impl<T> FromTuple2<T> for (T, T)
[src]

[src]

Implementors