Expand description
A really simple 2d line type - integer only
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Converts to boostvoronoi::geometry::Line<T>
from &[Into<Point<T>>;2]
Converts to boostvoronoi::geometry::Line
from &[T;4]
let a = [0,1,2,3];
let bl = Line::<i32>::from(&a);
assert_eq!(bl.start.x,a[0]);
assert_eq!(bl.start.y,a[1]);
assert_eq!(bl.end.x,a[2]);
assert_eq!(bl.end.y,a[3]);
A copy conversion from &boostvoronoi::geometry::Line
to boostvoronoi::geometry::Line
This makes it possible to accept an Iter<Into<Line>>
and Iter<&Line>
in the same method.
let c = [1,2,3,4];
let p1:Line<i32> = Line::from(c);
let p2:Line<i32> = Line::from(&p1);
assert_eq!(p2.start.x,c[0]);
assert_eq!(p2.start.y,c[1]);
assert_eq!(p2.end.x,c[2]);
assert_eq!(p2.end.y,c[3]);
Converts to boostvoronoi::geometry::Line<T>
from [Into<Point<T>>;2]
Converts to boostvoronoi::geometry::Line
from [T;4]
let a = [0,1,2,3];
let bl = Line::<i32>::from(a);
assert_eq!(bl.start.x,a[0]);
assert_eq!(bl.start.y,a[1]);
assert_eq!(bl.end.x,a[2]);
assert_eq!(bl.end.y,a[3]);
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T, U> Into<U> for T where
U: From<T>,
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.