pub enum Message {
RegisterCommandRequest {
id: MessageId,
meta: Option<MessageMeta>,
command: CommandDef,
},
RegisterCommandResponse {
id: MessageId,
meta: Option<MessageMeta>,
thid: MessageId,
response: RegisterResult,
},
ListCommandsRequest {
id: MessageId,
meta: Option<MessageMeta>,
},
ListCommandsResponse {
id: MessageId,
meta: Option<MessageMeta>,
thid: MessageId,
commands: Vec<CommandDef>,
},
ExecuteCommandRequest {
id: MessageId,
meta: Option<MessageMeta>,
command_id: String,
request: Option<Value>,
},
ExecuteCommandResponse {
id: MessageId,
meta: Option<MessageMeta>,
thid: MessageId,
response: ExecuteResult,
},
Event {
id: MessageId,
meta: Option<MessageMeta>,
event_id: String,
payload: Option<Value>,
},
}Expand description
Discriminated union of every message type carried on a channel.
The type tag strings are the same dotted identifiers used by the
TypeScript MessageType enum.
Variants§
RegisterCommandRequest
RegisterCommandResponse
ListCommandsRequest
ListCommandsResponse
ExecuteCommandRequest
ExecuteCommandResponse
Event
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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