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

Methods

impl<T> Line<T> where
    T: CoordinateType
[src]

[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]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<T: Clone> Clone for Line<T> where
    T: CoordinateType
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: Copy> Copy for Line<T> where
    T: CoordinateType
[src]

impl<T: Debug> Debug for Line<T> where
    T: CoordinateType
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<T> Send for Line<T> where
    T: Send

impl<T> Sync for Line<T> where
    T: Sync