[][src]Struct gpx::Route

pub struct Route {
    pub name: Option<String>,
    pub comment: Option<String>,
    pub description: Option<String>,
    pub source: Option<String>,
    pub links: Vec<Link>,
    pub number: Option<u32>,
    pub _type: Option<String>,
    pub points: Vec<Waypoint>,
}

Route represents an ordered list of waypoints representing a series of turn points leading to a destination.

Fields

name: Option<String>

GPS name of route.

comment: Option<String>

GPS comment for route.

description: Option<String>

User description of route.

source: Option<String>

Source of data. Included to give user some idea of reliability and accuracy of data.

links: Vec<Link>

Links to external information about the route.

number: Option<u32>

GPS route number.

_type: Option<String>

Type (classification) of route.

points: Vec<Waypoint>

Each Waypoint holds the coordinates, elevation, timestamp, and metadata for a single point in a track.

Methods

impl Route[src]

pub fn linestring(&self) -> LineString<f64>[src]

Gives the linestring of the segment's points, the sequence of points that comprises the track segment.

pub fn new() -> Route[src]

Creates a new Route with default values.

extern crate gpx;
extern crate geo_types;

use gpx::{Route, Waypoint};
use geo_types::Point;

fn main() {
    let mut route: Route = Route::new();

    let point = Waypoint::new(Point::new(-121.97, 37.24));
    route.points.push(point);
}

Trait Implementations

impl Clone for Route[src]

impl Debug for Route[src]

impl Default for Route[src]

impl From<Route> for Geometry<f64>[src]

Auto Trait Implementations

impl RefUnwindSafe for Route

impl Send for Route

impl Sync for Route

impl Unpin for Route

impl UnwindSafe for Route

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.