pub enum Incoming {
SetSlotValues {
values: HashMap<String, Value>,
},
GetSlotValues {
slots: Vec<String>,
},
ListSlots {
path: Option<String>,
},
ListMethods {
path: Option<String>,
},
Invoke {
method: String,
args: HashMap<String, Value>,
request_id: Option<String>,
},
}Expand description
Messages received from WebSocket clients.
All incoming messages use a type field to discriminate the message kind.
Example JSON: {"type": "set_slot_values", "values": {...}}
Variants§
SetSlotValues
Set values on slots.
Example: {"type": "set_slot_values", "values": {"face/mouth": {"f64": 0.5}}}
GetSlotValues
Get values of slots.
Example: {"type": "get_slot_values", "slots": ["face/mouth", "face/eyes"]}
ListSlots
Request the list of available slots.
Example: {"type": "list_slots"} or {"type": "list_slots", "path": "face"}
ListMethods
Request the list of available RPC methods.
Example: {"type": "list_methods"} or {"type": "list_methods", "path": "audio"}
Invoke
Invoke an RPC method.
Example: {"type": "invoke", "method": "reset", "request_id": "req-1"}
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Incoming
impl<'de> Deserialize<'de> for Incoming
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
Auto Trait Implementations§
impl Freeze for Incoming
impl RefUnwindSafe for Incoming
impl Send for Incoming
impl Sync for Incoming
impl Unpin for Incoming
impl UnsafeUnpin for Incoming
impl UnwindSafe for Incoming
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