pub enum MessageTarget {
Myself,
ModuleSlot(usize),
Cockpit(u8),
Broadcast {
across_couplings: bool,
include_self: bool,
},
AcrossCoupling {
coupling: Coupling,
cascade: bool,
},
Parent,
// some variants omitted
}Expand description
Ziel einer Nachricht.
Represents a message target.
Variants§
Myself
Das Script selbst.
The script itself.
ModuleSlot(usize)
Das Modul im Fahrzeug-Modulslot mit dem angegebenen Index (module_slot_index).
The module in the vehicle module slot with the given index (module_slot_index).
Cockpit(u8)
An alle Module im Cockpit mit dem angegebenen Index.
To all modules in the cockpit with the given index.
Broadcast
Broadcast an Scripts gemäß dem angegebenen Umfang.
Broadcast to scripts based on the specified scope.
Fields
AcrossCoupling
Senden an eine bestimmte Kupplung.
Send to a specific coupling.
Fields
Parent
Das übergeordnete Script.
The parent script.
Implementations§
Source§impl MessageTarget
impl MessageTarget
Sourcepub fn broadcast_except_self(across_couplings: bool) -> MessageTarget
pub fn broadcast_except_self(across_couplings: bool) -> MessageTarget
Hilfsfunktion für Broadcast-Ziele ohne das eigene Script.
Helper to create a broadcast target that excludes self
Sourcepub fn broadcast_all() -> MessageTarget
pub fn broadcast_all() -> MessageTarget
Sendet an alle Scripts in der Zugbildung, einschließlich des eigenen.
Broadcasts to all scripts in the train composition, including self.
Trait Implementations§
Source§impl Clone for MessageTarget
impl Clone for MessageTarget
Source§fn clone(&self) -> MessageTarget
fn clone(&self) -> MessageTarget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more