Skip to main content

PisStation

Struct PisStation 

Source
pub struct PisStation {
    pub id: String,
    pub code: u32,
    pub interieur_display: [String; 2],
    pub terminus_front_option: Option<[String; 2]>,
    pub terminus_side_option: Option<[String; 2]>,
    pub terminus_oneline: String,
}
Expand description

Datensatz für eine Station im PIS.

PIS station record.

Fields§

§id: String

Mit der ID wird die Station mit der Map verknüpft (auch dort gibt es eine ID für jede Station). Dies ist u. a. für die Fahrgäste und die öffentlichen KI-Fahrzeuge notwendig.

Links the station to the map (each station has an id there as well). Required e.g. for passengers and public AI vehicles.

§code: u32

Der Code ist die Zahl, mit der die Station innerhalb des PIS identifiziert wird. Dieser Code wird für die Anzeige auf dem PIS-Display verwendet.

Numeric code identifying the station within the PIS; used on PIS displays.

§interieur_display: [String; 2]

Die Strings sind die Texte, die auf den Innenanzeigen angezeigt werden. Zwei Strings gibt es z. B. für Wechselanzeigen.

Interior display texts; two strings e.g. for alternating displays.

§terminus_front_option: Option<[String; 2]>

Optionale zweizeilige Front-Außenanzeige.

Optional two-line front exterior destination display.

§terminus_side_option: Option<[String; 2]>

Optionale zweizeilige Seiten-Zielanzeige.

Optional two-line side destination display strings.

§terminus_oneline: String

Einzeiliger Außenzieltext.

Single-line exterior destination text.

Implementations§

Source§

impl PisStation

Source

pub fn terminus_front( &self, one_to_two_line: PisStationTerminusOneLineTo, ) -> [String; 2]

Liefert die (zweizeilige) Front-Außenanzeige für das Ziel. Verfügt die Ziel-Station über keine zweizeilige Front-Außenanzeige, so wird die einzeilige Außenanzeige um eine Leerzeile erweitert, wobei one_to_two_line die Reihenfolge dieser Erweiterung bestimmt:

  • FirstLine: Die einzeilige Zeile wird in die erste Zeile und die Leerzeile in die zweite Zeile eingefügt
  • SecondLine: Die einzeilige Zeile wird in die zweite Zeile und die Leerzeile in die erste Zeile eingefügt

Returns the (two-line) front exterior destination display. If no two-line front display is defined, the one-line text is expanded with a blank line; one_to_two_line controls the order:

  • FirstLine: one-line text on the first line, blank on the second
  • SecondLine: blank on the first line, one-line text on the second
Source

pub fn terminus_side( &self, one_to_two_line: PisStationTerminusOneLineTo, ) -> [String; 2]

Gibt die zweizeilige Seiten-Zielanzeige dieser Station zurück.

Returns the two-line side destination display for this station.

Source

pub fn code_is_public(&self) -> bool

Gibt zurück, ob der Stationscode ein öffentlicher PIS-Code ist.

Returns whether the station code is a public PIS code.

Trait Implementations§

Source§

impl Clone for PisStation

Source§

fn clone(&self) -> PisStation

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for PisStation

Source§

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

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

impl<'de> Deserialize<'de> for PisStation

Source§

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

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for PisStation

Source§

impl PartialEq for PisStation

Source§

fn eq(&self, other: &PisStation) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for PisStation

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PisStation

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.