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 Points
Fields
start: Point<T>
end: Point<T>
Methods
impl<T> Line<T> where
T: CoordinateType, [src]
impl<T> Line<T> where
T: CoordinateType, pub fn new(start: Point<T>, end: Point<T>) -> Line<T>[src]
pub fn new(start: Point<T>, end: Point<T>) -> Line<T>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]
impl<T: PartialEq> PartialEq for Line<T> where
T: CoordinateType, fn eq(&self, other: &Line<T>) -> bool[src]
fn eq(&self, other: &Line<T>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Line<T>) -> bool[src]
fn ne(&self, other: &Line<T>) -> boolThis method tests for !=.
impl<T: Clone> Clone for Line<T> where
T: CoordinateType, [src]
impl<T: Clone> Clone for Line<T> where
T: CoordinateType, fn clone(&self) -> Line<T>[src]
fn clone(&self) -> Line<T>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
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]
impl<T: Copy> Copy for Line<T> where
T: CoordinateType, impl<T: Debug> Debug for Line<T> where
T: CoordinateType, [src]
impl<T: Debug> Debug for Line<T> where
T: CoordinateType,