[][src]Struct trenitalia::TrainStation

pub struct TrainStation {
    pub id: String,
    pub region_id: u8,
    pub position: (f64, f64),
    pub aliases: Vec<String>,
    pub vt_id: Option<String>,
    pub lefrecce_name: Option<String>,
}

Struct that holds the train station data

Fields

id: String

Three-charachters ID

region_id: u8

Trenitalia region ID

position: (f64, f64)

Tuple that contains latitude and longitude

aliases: Vec<String>

List of possible aliases of a station

vt_id: Option<String>

Station ID used for the ViaggaTreno API

lefrecce_name: Option<String>

Station name used for the LeFrecce API

Methods

impl TrainStation[src]

pub fn get_name(&self) -> &str[src]

Get the station's name (the first alias)

Trait Implementations

impl Clone for TrainStation[src]

impl Debug for TrainStation[src]

impl<'de> Deserialize<'de> for TrainStation[src]

impl Serialize for TrainStation[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[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.