#[non_exhaustive]pub enum OutEvent {
Action {
name: String,
component_id: String,
event: String,
context: Value,
payload: Option<Value>,
},
OpenUrl {
url: String,
},
FunctionCall {
component_id: String,
name: String,
args: Value,
},
DataChanged {
path: String,
value: Value,
},
Input {
component_id: String,
name: String,
path: Option<String>,
value: Value,
commit: bool,
},
Focus {
id: String,
index: u32,
},
Announce {
text: String,
live: String,
},
Copy {
text: String,
},
PickFiles {
component_id: String,
accept: Option<String>,
multiple: bool,
},
Relayout,
HoverTimer {
owner: String,
delay_ms: u32,
},
ScrollSurface {
x: f32,
y: f32,
},
}Expand description
What the host must do after an interaction (non_exhaustive: match with
a wildcard arm; new kinds are additive). The wire form is camelCase
throughout, kinds AND fields ({kind: "action", componentId, …},
{kind: "hoverTimer", owner, delayMs}), as the host API’s.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Action
A server event (A2UI action): forward it. context = the author’s
context with the event payload merged over it.
OpenUrl
openUrl or a Link.
FunctionCall
An on.<event> functionCall naming a HOST function (not one of
the catalog’s built-ins, FUNCTION_NAMES): the host looks it up in
its registry and runs it through the policy gate
(host::decide_function, VAPP-91). args = the call’s args resolved
against the data model and scope. Serialized {kind: "functionCall", componentId, name, args}.
DataChanged
A bound value was written through to the data model.
Input
A host-owned input edit (the host forwards with its revision).
Focus
Move keyboard focus (a Form’s first invalid field, focus command).
Announce
Speak through the platform’s live region.
Copy
Put text on the clipboard (CodeBlock copy).
PickFiles
Open the platform file picker for a FileUpload; the picked files come
back as event(<dropzone>, "upload", {files}) (bytes via the host).
Relayout
Local UI state changed: lay out again.
HoverTimer
Call Surface::hover_timeout(owner) after delay_ms (a hover
overlay whose trigger and content were left; it closes then unless
the pointer came back). Keep ONE timer per owner: a new HoverTimer
for the same owner restarts it.
ScrollSurface
Round 2: scroll the host viewport of the whole surface to (x, y)
(a scrollToIndex on a list the page scrolls), then report it with
Surface::set_surface_scroll.