Enum MessageOut

Source
pub enum MessageOut<G, S, M> {
Show 13 variants SetTitle { context: String, payload: TitlePayload, }, SetImage { context: String, payload: ImagePayload, }, ShowAlert { context: String, }, ShowOk { context: String, }, GetSettings { context: String, }, SetSettings { context: String, payload: S, }, SetState { context: String, payload: StatePayload, }, SendToPropertyInspector { action: String, context: String, payload: M, }, SwitchToProfile { context: String, device: String, payload: ProfilePayload, }, OpenUrl { payload: UrlPayload, }, GetGlobalSettings { context: String, }, SetGlobalSettings { context: String, payload: G, }, LogMessage { payload: LogMessagePayload, },
}
Expand description

A message to be sent to the Stream Deck software.

  • G represents the global settings that are persisted within the Stream Deck software.
  • S represents the action settings that are persisted within the Stream Deck software.
  • M represents the messages that are sent to the property inspector.

Official Documentation

Variants§

§

SetTitle

Set the title of an action instance.

Official Documentation

Fields

§context: String

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

§payload: TitlePayload

The title to set.

§

SetImage

Set the image of an action instance.

Official Documentation

Fields

§context: String

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

§payload: ImagePayload

The image to set.

§

ShowAlert

Temporarily overlay the key image with an alert icon.

Official Documentation

Fields

§context: String

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

§

ShowOk

Temporarily overlay the key image with a checkmark.

Official Documentation

Fields

§context: String

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

§

GetSettings

Retrieve settings for an instance of an action via DidReceiveSettings.

Official Documentation

Fields

§context: String

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

§

SetSettings

Store settings for an instance of an action.

Official Documentation

Fields

§context: String

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

§payload: S

The settings to save.

§

SetState

Set the state of an action.

Normally, Stream Deck changes the state of an action automatically when the key is pressed.

Official Documentation

Fields

§context: String

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

§payload: StatePayload

The desired state.

§

SendToPropertyInspector

Send data to the property inspector.

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

The message to send.

§

SwitchToProfile

Select a new profile.

Official Documentation

Fields

§context: String

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

§device: String

The device to change the profile of.

§payload: ProfilePayload

The profile to activate.

§

OpenUrl

Open a URL in the default browser.

Official Documentation

Fields

§payload: UrlPayload

The url to open.

§

GetGlobalSettings

Retrieve plugin settings for via DidReceiveGlobalSettings.

Official Documentation

Fields

§context: String

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

§

SetGlobalSettings

Store plugin settings.

Official Documentation

Fields

§context: String

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

§payload: G

The settings to save.

§

LogMessage

Write to the log.

Official Documentation

Fields

§payload: LogMessagePayload

The message to log.

Trait Implementations§

Source§

impl<G: Debug, S: Debug, M: Debug> Debug for MessageOut<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 MessageOut<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 MessageOut<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
Source§

impl<G, S, MI, MO> Sink<MessageOut<G, S, MO>> for StreamDeckSocket<G, S, MI, MO>
where G: Serialize, S: Serialize, MO: Serialize,

Source§

type Error = StreamDeckSocketError

The type of value produced by the sink when an error occurs.
Source§

fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Attempts to prepare the Sink to receive a value. Read more
Source§

fn start_send( self: Pin<&mut Self>, item: MessageOut<G, S, MO>, ) -> Result<(), Self::Error>

Begin the process of sending a value to the sink. Each call to this function must be preceded by a successful call to poll_ready which returned Poll::Ready(Ok(())). Read more
Source§

fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Flush any remaining output from this sink. Read more
Source§

fn poll_close( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Flush any remaining output and close this sink, if necessary. Read more

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

impl<G, S, M> UnwindSafe for MessageOut<G, S, M>
where S: UnwindSafe, M: 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,