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 } } }