pub struct TrainConfigurationChanged {
pub entity_id: u64,
pub reversed_to_train: bool,
pub index_in_train: usize,
pub train_vehicle_count: usize,
}Expand description
Describes an event that is sent when the train configuration is changed. Please note: When two trains with different directions are coupled, the new direction cannot be predicted! In the vehicles of the train whose direction is inverted when coupling, “reversed_to_train” is inverted and the index order reverses.
Fields§
§entity_id: u64§reversed_to_train: bool§index_in_train: usize§train_vehicle_count: usizeImplementations§
Source§impl TrainConfigurationChanged
Calculation of the vehicle count in front or behind the vehicle
relative to the vehicle.
impl TrainConfigurationChanged
Calculation of the vehicle count in front or behind the vehicle relative to the vehicle.
pub fn neighbour_vehicle_count(&self, coupling: Coupling) -> usize
Trait Implementations§
Source§impl Clone for TrainConfigurationChanged
impl Clone for TrainConfigurationChanged
Source§fn clone(&self) -> TrainConfigurationChanged
fn clone(&self) -> TrainConfigurationChanged
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TrainConfigurationChanged
impl Debug for TrainConfigurationChanged
Source§impl<'de> Deserialize<'de> for TrainConfigurationChanged
impl<'de> Deserialize<'de> for TrainConfigurationChanged
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TrainConfigurationChanged, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TrainConfigurationChanged, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl MessageType for TrainConfigurationChanged
impl MessageType for TrainConfigurationChanged
Source§const MESSAGE_META: MessageMeta
const MESSAGE_META: MessageMeta
The metadata for the message type.
Source§impl PartialEq for TrainConfigurationChanged
impl PartialEq for TrainConfigurationChanged
Source§fn eq(&self, other: &TrainConfigurationChanged) -> bool
fn eq(&self, other: &TrainConfigurationChanged) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TrainConfigurationChanged
impl Serialize for TrainConfigurationChanged
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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
impl StructuralPartialEq for TrainConfigurationChanged
Auto Trait Implementations§
impl Freeze for TrainConfigurationChanged
impl RefUnwindSafe for TrainConfigurationChanged
impl Send for TrainConfigurationChanged
impl Sync for TrainConfigurationChanged
impl Unpin for TrainConfigurationChanged
impl UnsafeUnpin for TrainConfigurationChanged
impl UnwindSafe for TrainConfigurationChanged
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more