#[non_exhaustive]
pub enum SystemEvent {
Show 21 variants OneSecond, FourSeconds, SixTimesPerSecond, AircraftLoaded { file_name: String, }, Crashed, CrashReset, FlightLoaded { file_name: String, }, FlightSaved { file_name: String, }, FlightPlanActivated { file_name: String, }, FlightPlanDeactivated, Frame { frame_rate: f32, sim_speed: f32, }, Pause { state: bool, }, Paused, PauseFrame { frame_rate: f32, sim_speed: f32, }, PositionChanged, Sim { state: bool, }, SimStart, SimStop, Sound { state: bool, }, Unpaused, View { view: ViewType, },
}
Expand description

SimConnect System Event Notification.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

OneSecond

A notification every second.

FourSeconds

A notification every four seconds.

SixTimesPerSecond

A notification six times per second. This is the same rate that joystick movement events are transmitted.

AircraftLoaded

Fields

file_name: String

The returned filename.

A notification when the aircraft flight dynamics file is changed. These files have a .AIR extension. The filename is returned.

Crashed

A notification if the user aircraft crashes.

CrashReset

A notification when the crash cut-scene has completed.

FlightLoaded

Fields

file_name: String

The returned filename.

A notification when a flight is loaded. Note that when a flight is ended, a default flight is typically loaded, so these events will occur when flights and missions are started and finished. The filename of the flight loaded is returned.

FlightSaved

Fields

file_name: String

The returned filename.

A notification when a flight is saved correctly. The filename of the flight saved is returned.

FlightPlanActivated

Fields

file_name: String

The returned filename.

A notification when a new flight plan is activated. The filename of the activated flight plan is returned.

FlightPlanDeactivated

A notification when the active flight plan is de-activated.

Frame

Fields

frame_rate: f32

The visual frame rate in frames per second.

sim_speed: f32

The simulation rate. For example if the simulation is running at four times normal speed – 4X – then 4.0 will be returned.

Notifications every visual frame.

Pause

Fields

state: bool

The current pause state (true = paused or false = unpaused).

Notifications when the scenario is paused or unpaused, and also immediately returns the current pause state.

Paused

A notification when the scenario is paused.

PauseFrame

Fields

frame_rate: f32

The visual frame rate in frames per second.

sim_speed: f32

The simulation rate. For example if the simulation is running at four times normal speed – 4X – then 4.0 will be returned.

Notifications for every visual frame that the simulation is paused.

PositionChanged

A notification when the user changes the position of their aircraft through a dialog.

Sim

Fields

state: bool

The current state (true = running or false = not running).

Notifications when the scenario is running or not, and also immediately returns the current state.

SimStart

The simulator is running. Typically the user is actively controlling the vehicle which is on the ground, underwater or in the air.

SimStop

The simulator is not running. Typically the user is loading a scenario, navigating the user interface or in a dialog.

Sound

Fields

state: bool

The current state of the master sound switch. false if the switch is off, true if the switch is on.

A notification when the master sound switch is changed. This request will also return the current state of the master sound switch immediately.

Unpaused

A notification when the flight is un-paused.

View

Fields

view: ViewType

The current cockpit view type.

A notification when the user aircraft view is changed. This request will also return the current view immediately.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more