pub enum RendererMessage {
Hello {
name: String,
render_target: Value,
capabilities: Value,
instances: Option<Vec<InstanceSnapshot>>,
},
Ping,
LoadResult {
request_id: Uuid,
instance_id: InstanceId,
graphic_id: String,
data: Option<Value>,
status_code: u16,
status_message: Option<String>,
},
PlayActionResult {
request_id: Uuid,
instance_id: InstanceId,
status_code: u16,
status_message: Option<String>,
current_step: f64,
},
StopActionResult {
request_id: Uuid,
instance_id: InstanceId,
status_code: u16,
status_message: Option<String>,
},
UpdateActionResult {
request_id: Uuid,
instance_id: InstanceId,
data: Option<Value>,
status_code: u16,
status_message: Option<String>,
},
CustomActionResult {
request_id: Uuid,
instance_id: InstanceId,
status_code: u16,
status_message: Option<String>,
},
RendererCustomActionResult {
request_id: Uuid,
status_code: u16,
status_message: Option<String>,
result: Option<Value>,
},
ClearResult {
request_id: Uuid,
instance_id: InstanceId,
status_code: u16,
status_message: Option<String>,
},
}Expand description
Messages received from a renderer over its WebSocket.
Variants§
Hello
Fields
§
instances: Option<Vec<InstanceSnapshot>>Optional instance state snapshots for reconnect state resync — if present, Core will populate the session’s instances from this list rather than starting empty (Wish 3: renderer reconnect state resync).
Ping
LoadResult
Fields
§
instance_id: InstanceIdPlayActionResult
Fields
§
instance_id: InstanceIdStopActionResult
UpdateActionResult
Fields
§
instance_id: InstanceIdCustomActionResult
RendererCustomActionResult
ClearResult
Implementations§
Source§impl RendererMessage
impl RendererMessage
Sourcepub fn request_id(&self) -> Option<Uuid>
pub fn request_id(&self) -> Option<Uuid>
The correlation id this message is a reply to, if any (Hello/Ping
carry none since nothing on the server side is awaiting them).
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Whether this result message indicates success (status_code < 400).
Returns false for Hello/Ping which carry no status code.
Trait Implementations§
Source§impl Clone for RendererMessage
impl Clone for RendererMessage
Source§impl Debug for RendererMessage
impl Debug for RendererMessage
Source§impl<'de> Deserialize<'de> for RendererMessage
impl<'de> Deserialize<'de> for RendererMessage
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 RendererMessage
impl RefUnwindSafe for RendererMessage
impl Send for RendererMessage
impl Sync for RendererMessage
impl Unpin for RendererMessage
impl UnsafeUnpin for RendererMessage
impl UnwindSafe for RendererMessage
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