pub enum IncomingMessage {
Show 17 variants
Snapshot {
tree: TreeNode,
},
Patch {
ops: Vec<PatchOp>,
},
Effect {
id: String,
kind: String,
payload: Value,
},
WidgetOp {
op: String,
payload: Value,
},
Subscribe {
kind: String,
tag: String,
},
Unsubscribe {
kind: String,
},
WindowOp {
op: String,
window_id: String,
settings: Value,
},
Settings {
settings: Value,
},
Query {
id: String,
target: String,
selector: Value,
},
Interact {
id: String,
action: String,
selector: Value,
payload: Value,
},
TreeHash {
id: String,
name: String,
},
Screenshot {
id: String,
name: String,
width: Option<u32>,
height: Option<u32>,
},
Reset {
id: String,
},
ImageOp {
op: String,
handle: String,
data: Option<Vec<u8>>,
pixels: Option<Vec<u8>>,
width: Option<u32>,
height: Option<u32>,
},
ExtensionCommand {
node_id: String,
op: String,
payload: Value,
},
ExtensionCommands {
commands: Vec<ExtensionCommandItem>,
},
AdvanceFrame {
timestamp: u64,
},
}Expand description
Messages sent from the host to the renderer over stdin.
Variants§
Snapshot
Replace the entire UI tree with a new snapshot.
Patch
Apply incremental changes to the retained UI tree.
Effect
Request a platform effect (file dialog, clipboard, notification).
WidgetOp
Perform a widget operation (focus, scroll, select, etc.).
Subscribe
Subscribe to a runtime event source (keyboard, mouse, window, etc.).
Unsubscribe
Unsubscribe from a runtime event source.
WindowOp
Perform a window operation (resize, move, close, etc.).
Settings
Apply or update renderer settings.
Query
Query the current tree or find a widget.
Interact
Interact with a widget (click, type, etc.)
TreeHash
Capture a structural tree hash (hash of JSON tree).
Screenshot
Capture a pixel screenshot (GPU-rendered RGBA data).
Reset
Reset the app state.
ImageOp
Image operation (create, update, delete in-memory image handles).
Binary fields (data, pixels) accept either raw bytes (from msgpack)
or base64-encoded strings (from JSON). The custom deserializer handles both.
Fields
ExtensionCommand
A single extension command pushed to a native extension widget. Bypasses the normal tree update / diff / patch cycle.
ExtensionCommands
A batch of extension commands processed in one cycle.
Fields
commands: Vec<ExtensionCommandItem>AdvanceFrame
Advance the animation clock by one frame (headless/test mode).
Emits an animation_frame event if on_animation_frame is subscribed.
Trait Implementations§
Source§impl Clone for IncomingMessage
impl Clone for IncomingMessage
Source§fn clone(&self) -> IncomingMessage
fn clone(&self) -> IncomingMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IncomingMessage
impl Debug for IncomingMessage
Source§impl<'de> Deserialize<'de> for IncomingMessage
impl<'de> Deserialize<'de> for IncomingMessage
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>,
Auto Trait Implementations§
impl Freeze for IncomingMessage
impl RefUnwindSafe for IncomingMessage
impl Send for IncomingMessage
impl Sync for IncomingMessage
impl Unpin for IncomingMessage
impl UnsafeUnpin for IncomingMessage
impl UnwindSafe for IncomingMessage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Application.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more