pub struct TrainStation {
    pub name: String,
    pub code: String,
    pub tz: String,
    pub bus: bool,
    pub schedule_arrival: DateTime<FixedOffset>,
    pub schedule_departure: DateTime<FixedOffset>,
    pub arrival: Option<DateTime<FixedOffset>>,
    pub departure: Option<DateTime<FixedOffset>>,
    pub arrival_comment: String,
    pub departure_comment: String,
    pub status: TrainStatus,
}

Fields§

§name: String

The full human readable name of the station.

Examples:

  • Philadelphia 30th Street
  • New York Penn
§code: String

The unique identification code of this station.

Examples:

  • PHL
  • NYP
§tz: String

The timezone of this station.

§bus: bool§schedule_arrival: DateTime<FixedOffset>

The scheduled arrival time of this train for the current station.

§schedule_departure: DateTime<FixedOffset>

The scheduled departure time of this train for the current station.

§arrival: Option<DateTime<FixedOffset>>

The actual arrival time of this train for the current station specified by name or code. When the status is Departed this field shows a historical value of how late or early the train arrived. When the status is Enroute this field is a prediction on how late or early the train will arrive.

Examples: 2023-09-05T16:22:00-05:00 2023-09-05T15:54:00-05:00 null or not included in response

§departure: Option<DateTime<FixedOffset>>

The actual departure time of this train for the current station specified by name or code. When the status is Departed this field shows a historical value of how late or early the train departed. When the status is Enroute this field is a prediction on how late or early the train will depart.

Examples: 2023-09-05T16:22:00-05:00 2023-09-05T15:54:00-05:00 null or not included in response

§arrival_comment: String

A human readable comment on the arrival time of this train for current station specified by name or code. When the status is Departed this field shows a historical value of how late or early the train arrived. When the status is Enroute this field is a prediction on how late or early the train will arrive.

Examples: 19 Minutes Late On Time NaN Minutes Early (Yes really)

§departure_comment: String

A human readable comment on the departure time of this train for the current station specified by name or code. When the status is Departed this field shows a historical value of how late or early the train departed. When the status is Enroute this field is a prediction on how late or early the train will depart.

Examples: 19 Minutes Late On Time NaN Minutes Early (Yes really)

§status: TrainStatus

The current status of this train for the current station specified by [name] or [code].

Trait Implementations§

source§

impl Clone for TrainStation

source§

fn clone(&self) -> TrainStation

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TrainStation

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TrainStation

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,