Skip to main content

PisGroup

Struct PisGroup 

Source
pub struct PisGroup {
    pub name: String,
    pub stations: Vec<PisStation>,
    pub special_chars: Vec<PisSpecialChar>,
    pub routes: Vec<PisRoute>,
    pub server_name: Option<String>,
}
Expand description

Namespace zum Abfragen der aktiven PIS-Gruppe aus dem Simulator.

Scripts konstruieren diesen Typ nicht manuell; die zugehörigen Funktionen (z. B. PisGroup::get_all_stations) lesen PIS-Daten zur Laufzeit.

Namespace for querying the active PIS group from the simulator.

Scripts do not construct this type manually; call the associated functions (e.g. PisGroup::get_all_stations) to read PIS data at runtime.

Fields§

§name: String

Name der PIS-Gruppe.

Name of the PIS group.

§stations: Vec<PisStation>

In den Gruppendaten enthaltene Stationen.

Stations contained in the group data set.

§special_chars: Vec<PisSpecialChar>

In der Gruppe definierte Sonderzeichen.

Special characters defined in the group.

§routes: Vec<PisRoute>

In der Gruppe definierte Routen.

Routes defined in the group.

§server_name: Option<String>

Optionaler Name des Leitstellen-Servers.

Optional dispatch server name.

Implementations§

Source§

impl PisGroup

Source

pub fn get_name() -> String

Holt den Namen der aktiven PIS-Gruppe.

Returns the name of the active PIS group.

Source

pub fn get_station(code: u32) -> Option<PisStation>

Holt die Station mit dem gegebenen Code.

Returns the station with the given code.

Source

pub fn get_special_char_with_line(line: u32, special_char_code: u32) -> String

Holt den aufgelösten Sonderzeichen-String für die gegebene Linie und den Code.

Returns the resolved special-character string for the given line and code.

Source

pub fn get_route(line_code: (u32, u32)) -> Option<PisRoute>

Holt die Route mit der gegebenen Linie und dem Code.

Returns the route for the given line and route code.

Source

pub fn get_route_codes_by_line(line: u32) -> Vec<u32>

Liefert eine sortierte, duplikatfreie Liste aller Routencodes für die gegebene Linie.

Returns sorted unique route codes available for the given line.

Source

pub fn get_all_stations() -> Vec<PisStation>

Liefert sämtliche Stationen der aktiven PIS-Gruppe.

Returns all stations of the active PIS group.

Source

pub fn get_all_routes() -> Vec<PisRoute>

Liefert sämtliche Routen der aktiven PIS-Gruppe.

Returns all routes of the active PIS group.

Source

pub fn get_all_special_chars_with_line(line: u32) -> Vec<(u32, String)>

Liefert sämtliche Sonderzeichen der aktiven PIS-Gruppe, aufgelöst für die gegebene Linie. Jedes Tupel enthält den Sonderzeichen-Code und den aufgelösten Anzeigestring.

Returns all special characters of the active PIS group resolved for the given line.

Source

pub fn get_server_name() -> Option<String>

Holt den Namen des Leitstellen-Servers.

Returns the name of the dispatch server, if connected.

Trait Implementations§

Source§

impl Clone for PisGroup

Source§

fn clone(&self) -> PisGroup

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 PisGroup

Source§

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

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

impl Eq for PisGroup

Source§

impl PartialEq for PisGroup

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PisGroup

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> 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.