Struct geo_types::Line
[−]
[src]
pub struct Line<T> where
T: CoordinateType, { pub start: Point<T>, pub end: Point<T>, }
A line segment made up of exactly two Point
s
Fields
start: Point<T>
end: Point<T>
Methods
impl<T> Line<T> where
T: CoordinateType,
[src]
T: CoordinateType,
pub fn new(start: Point<T>, end: Point<T>) -> Line<T>
[src]
Creates a new line segment.
use geo_types::{Point, Line}; let line = Line::new(Point::new(0., 0.), Point::new(1., 2.)); assert_eq!(line.start, Point::new(0., 0.)); assert_eq!(line.end, Point::new(1., 2.));
Trait Implementations
impl<T: PartialEq> PartialEq for Line<T> where
T: CoordinateType,
[src]
T: CoordinateType,
fn eq(&self, __arg_0: &Line<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Line<T>) -> bool
[src]
This method tests for !=
.
impl<T: Clone> Clone for Line<T> where
T: CoordinateType,
[src]
T: CoordinateType,
fn clone(&self) -> Line<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Copy> Copy for Line<T> where
T: CoordinateType,
[src]
T: CoordinateType,
impl<T: Debug> Debug for Line<T> where
T: CoordinateType,
[src]
T: CoordinateType,