[][src]Struct trenitalia::TrainTrip

pub struct TrainTrip {
    pub train_number: TrainNumber,
    pub arrival: (TrainStation, DateTime<Local>),
    pub departure: (TrainStation, DateTime<Local>),
}

A train trip between two stations. Stops aren't specified

Fields

train_number: TrainNumberarrival: (TrainStation, DateTime<Local>)

Specify the station and time of arrival

departure: (TrainStation, DateTime<Local>)

Specify the station and time of departure

Methods

impl TrainTrip[src]

pub fn get_duration(&self) -> Duration[src]

This method returns the trip's duration

pub fn get_fare(&self) -> Option<f64>[src]

This method returns the trip's fare

Trait Implementations

impl Clone for TrainTrip[src]

impl Debug for TrainTrip[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> 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.