Expand description
Wire types for icedwright.
raw: the raw tree a live app records, whichicedwright_semantics::inferturns into a semantic tree. The harness and the remote endpoint produce the same values.- The typed remote protocol: one type per request, each tied to its response type and
method name through
Request, the handshake (Hello,Welcome,PROTOCOLandaccepts),Notifications,WireEventand the framing inWireFrame.
Geometry and roles come from icedwright-types. Nothing here depends on a JSON library:
both ends encode with serde_json, and values only the app can rebuild travel as JSON text.
Re-exports§
pub use raw::AnnotationSource;pub use raw::RawAnnotation;pub use raw::RawCall;pub use raw::RawKey;pub use raw::RawNode;pub use raw::RawTree;pub use raw::RawValue;pub use raw::RawWindow;pub use raw::RawWindowInfo;pub use raw::WidgetId;pub use raw::WindowId;
Modules§
- raw
- The raw tree a live app records: every operation callback as a node, in call order, with
annotations carried as owned data.
icedwright_semantics::inferturns it into a semantic tree.
Structs§
- Attachment
- The attachment a JSON frame announces; the binary frame follows it immediately.
- Bye
- Ends the session; the probe releases every window and rule the client held.
- Call
- A request in its envelope. Built with
Call::new, which takes the method from the request type. - Cursor
Reading - The cursor kind one layer was handed during a delivery.
- Delivered
- The answer to
Input. - Done
- The response to requests that only succeed or fail. Serialises as
null. - Drive
- Takes control of a window’s input; real input is dropped while held.
- Error
Body - The body of an error reply.
- Focus
- Asks the probe to give a window focus.
- Frame
Count - Rises on every redraw.
- Generation
- Rises whenever the app handles a message or the probe delivers an event.
- Guard
- What the client decided on before sending a guarded input.
- Hello
- The first request on a connection.
- Hold
Task - Holds every task of a name until released.
- Input
- Input events for one window.
- Inspect
- Turns the inspector’s pick mode on or off; picks arrive as
Hoverednotifications. - Next
Task - Waits for the next task of a name.
- Record
- Turns recording of real events on or off; they arrive as
Observednotifications. - Release
- Gives a window’s input back.
- Release
Task - Lets a held task run.
- Remove
Rule - Removes a rule.
- Reply
- A reply in its envelope:
{ "id": n, "result": .. }or{ "id": n, "error": .. }. - Request
Id - Chosen by the client; a reply carries its request’s id.
- Resolve
Task - Completes a held task without running it.
- Screenshot
- Asks for a window’s pixels.
- Screenshot
Header - The answer to
Screenshot; the RGBA bytes follow as an attachment. - Snapshot
- Asks for the raw tree. With
after, a long poll answered once the generation passes it. - Version
Mismatch - The peer speaks a different major version.
- Wait
Idle - Answered once no named task is in flight and the probe has no input, collection or guarded request outstanding.
- Welcome
- The answer to
Hello. - Window
List - The answer to
Windows. - Window
Ordinal - A window on the wire, numbered in order of first appearance.
- Windows
- Asks for the open windows.
- Wire
Duration - A real-time duration on the wire, in whole milliseconds.
- Wire
Frame - One frame.
- Wire
Modifiers - The modifiers held.
- Wire
Rule Id - A task rule the client installed.
- Wire
Task Id - A named task the probe is tracking.
Enums§
- AnyRequest
- Any request, for the probe’s dispatch. A match on it is exhaustive, so a request cannot be added without a handler.
- AnyResponse
- The response to any request, named by the request it answers. Serialises as the response itself.
- Error
Code - What an error reply says went wrong.
- Frame
Kind - What a frame’s payload holds.
- Notification
- What the probe pushes unasked. Notifications carry
eventand noid. - Protocol
Error - Framing, JSON and version errors, and error replies from the peer.
- Reply
Body - A result or an error.
- Snapshot
Reply - The answer to
Snapshot. - Task
Change - What a named task did.
- Task
Output - What a resolved task completes with, as JSON text the probe deserialises into the task’s output type.
- Wire
Button - A mouse button.
- Wire
Event - One input event.
- WireKey
- A logical key.
- Wire
Location - Where a key is on the keyboard.
- Wire
Physical Key - A physical key.
- Wire
Scroll Delta - How far a scroll moved.
- Wire
Status - What the widgets did with an event.
Constants§
- HEADER_
LEN - Bytes before the payload.
- MAX_
FRAME_ BYTES - The largest payload either end accepts.
- METHODS
- Every method name, in declaration order.
- PROTOCOL
(major, minor). Minor bumps only add optional fields; a different major cannot talk.
Traits§
- Request
- A request type, tied to its response type and method name, so a client cannot send one request and read another’s answer. Sealed: the list of requests is this crate’s.
Functions§
- accepts
- Checks the peer’s version from the handshake: the same major is accepted whatever the minor.