Enum Message

Source
pub enum Message<G, S, M> {
Show 16 variants KeyDown { action: String, context: String, device: String, payload: KeyPayload<S>, }, KeyUp { action: String, context: String, device: String, payload: KeyPayload<S>, }, WillAppear { action: String, context: String, device: Option<String>, payload: VisibilityPayload<S>, }, WillDisappear { action: String, context: String, device: Option<String>, payload: VisibilityPayload<S>, }, TitleParametersDidChange { action: String, context: String, device: Option<String>, payload: TitleParametersPayload<S>, }, DeviceDidConnect { device: String, device_info: DeviceInfo, }, DeviceDidDisconnect { device: String, }, ApplicationDidLaunch { payload: ApplicationPayload, }, ApplicationDidTerminate { payload: ApplicationPayload, }, SendToPlugin { action: String, context: String, payload: M, }, DidReceiveSettings { action: String, context: String, device: String, payload: KeyPayload<S>, }, PropertyInspectorDidAppear { action: String, context: String, device: String, }, PropertyInspectorDidDisappear { action: String, context: String, device: String, }, DidReceiveGlobalSettings { payload: GlobalSettingsPayload<G>, }, SystemDidWakeUp, Unknown,
}
Expand description

A message received from the Stream Deck software.

  • G represents the global settings that are persisted within the Stream Deck software.
  • S represents the settings that are persisted within the Stream Deck software.
  • M represents the messages that are received from the property inspector.

Official Documentation

Variants§

§

KeyDown

A key has been pressed.

Official Documentation

Fields

§action: String

The uuid of the action.

§context: String

The instance of the action (key or part of a multiaction).

§device: String

The device where the key was pressed.

§payload: KeyPayload<S>

Additional information about the key press.

§

KeyUp

A key has been released.

Official Documentation

Fields

§action: String

The uuid of the action.

§context: String

The instance of the action (key or part of a multiaction).

§device: String

The device where the key was pressed.

§payload: KeyPayload<S>

Additional information about the key press.

§

WillAppear

An instance of the action has been added to the display.

Official Documentation

Fields

§action: String

The uuid of the action.

§context: String

The instance of the action (key or part of a multiaction).

§device: Option<String>

The device where the action will appear, or None if it does not appear on a device.

§payload: VisibilityPayload<S>

Additional information about the action’s appearance.

§

WillDisappear

An instance of the action has been removed from the display.

Official Documentation

Fields

§action: String

The uuid of the action.

§context: String

The instance of the action (key or part of a multiaction).

§device: Option<String>

The device where the action was visible, or None if it was not on a device.

§payload: VisibilityPayload<S>

Additional information about the action’s appearance.

§

TitleParametersDidChange

The title has changed for an instance of an action.

Official Documentation

Fields

§action: String

The uuid of the action.

§context: String

The instance of the action (key or part of a multiaction).

§device: Option<String>

The device where the action is visible, or None if it is not on a device.

§payload: TitleParametersPayload<S>

Additional information about the new title.

§

DeviceDidConnect

A device has connected.

Official Documentation

Fields

§device: String

The ID of the device that has connected.

§device_info: DeviceInfo

Information about the device.

§

DeviceDidDisconnect

A device has disconnected.

Official Documentation

Fields

§device: String

The ID of the device that has disconnected.

§

ApplicationDidLaunch

An application monitored by the manifest file has launched.

Official Documentation

Fields

§payload: ApplicationPayload

Information about the launched application.

§

ApplicationDidTerminate

An application monitored by the manifest file has terminated.

Official Documentation

Fields

§payload: ApplicationPayload

Information about the terminated application.

§

SendToPlugin

The property inspector has sent data.

Official Documentation

Fields

§action: String

The uuid of the action.

§context: String

The instance of the action (key or part of a multiaction).

§payload: M

Information sent from the property inspector.

§

DidReceiveSettings

The application has sent settings for an action.

This message is sent in response to GetSettings, but also after the property inspector changes the settings.

Official Documentation

Fields

§action: String

The uuid of the action.

§context: String

The instance of the action (key or part of a multiaction).

§device: String

The device where the action exists.

§payload: KeyPayload<S>

The current settings for the action.

§

PropertyInspectorDidAppear

The property inspector for an action has become visible.

Official Documentation

Fields

§action: String

The uuid of the action.

§context: String

The instance of the action (key or part of a multiaction).

§device: String

The device where the action exists.

§

PropertyInspectorDidDisappear

The property inspector for an action is no longer visible.

Official Documentation

Fields

§action: String

The uuid of the action.

§context: String

The instance of the action (key or part of a multiaction).

§device: String

The device where the action exists.

§

DidReceiveGlobalSettings

The application has sent settings for an action.

This message is sent in response to GetGlobalSettings, but also after the property inspector changes the settings.

Official Documentation

Fields

§payload: GlobalSettingsPayload<G>

The current settings for the action.

§

SystemDidWakeUp

The computer has resumed from sleep.

Added in Stream Deck software version 4.3.

Official Documentation

§

Unknown

An event from an unsupported version of the Stream Deck software.

This occurs when the Stream Deck software sends an event that is not understood. Usually this will be because the Stream Deck software is newer than the plugin, and it should be safe to ignore these.

Trait Implementations§

Source§

impl<G: Debug, S: Debug, M: Debug> Debug for Message<G, S, M>

Source§

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

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

impl<'de, G, S, M> Deserialize<'de> for Message<G, S, M>
where G: Deserialize<'de>, S: Deserialize<'de>, M: Deserialize<'de>,

Source§

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

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

impl<G, S, M> Serialize for Message<G, S, M>
where G: Serialize, S: Serialize, M: Serialize,

Source§

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

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<G, S, M> Freeze for Message<G, S, M>
where M: Freeze, S: Freeze, G: Freeze,

§

impl<G, S, M> RefUnwindSafe for Message<G, S, M>

§

impl<G, S, M> Send for Message<G, S, M>
where M: Send, S: Send, G: Send,

§

impl<G, S, M> Sync for Message<G, S, M>
where M: Sync, S: Sync, G: Sync,

§

impl<G, S, M> Unpin for Message<G, S, M>
where M: Unpin, S: Unpin, G: Unpin,

§

impl<G, S, M> UnwindSafe for Message<G, S, M>
where M: UnwindSafe, S: UnwindSafe, G: UnwindSafe,

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> 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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

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

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,