Expand description
Session-engine traits and registry: retained document sessions producing paint frames (the genet HTML lanes, smolweb native). Session-engine traits and registry — the third engine kind (2026-07-10 session-engines plan).
Document engines (Engine) are request/response: bytes in,
serializable EngineDocument blocks out — the stored/authored
lane. Surface engines (SurfaceEngine) stream GPU textures from
external producers. Session engines sit between: retained document
sessions that lay content out once and then produce paint frames on
demand, with scroll, activation, and (for scripted lanes) a tick +
quiescence seam. The genet HTML lanes and the smolweb native lane are
session engines.
The frame type is generic (F) so this crate keeps zero paint
dependencies: a netrender host instantiates F = netrender::Scene; a
different host picks its own frame type. Lane-specific construction seams
(resource fetchers, cookie jars, themes) are injected into the concrete
SessionEngine at registration time, not carried in the spawn request —
the request stays plain data.
Structs§
- Content
Lineage - Host-neutral derivation evidence for an inspected document session.
- Content
Report - A structural report of a session’s addressed content — title, an outline
of role + name, outgoing links, headings. The introspection CONTRACT for
DocumentSession::inspect: pure data, so it lives here rather than in a render crate (genet-render’scontent_reportbuilds one from a LayoutDom and re-exports these types). Hosts that cannot downcast a session to its concrete type (the type may be private to its engine crate) read this instead — turnstone’s Inspector pane is the first such consumer. - Document
Clip - A host-neutral semantic fragment offered by a retained document session.
- Document
Clip Artifact - Exact source material offered with a semantic clip. The receiving domain decides whether and where to retain it.
- Document
Find Match - One retained match, in document order.
- Document
Find Query - A host-neutral document find query.
- Document
Find State - The retained result model shared by retained documents and hosted engines.
- Document
Zoom State - The retained page-zoom model shared by retained documents and hosted engines.
- Engine
Kind Index - Non-generic id-to-kind resolution: which registries hold each id is just a map, so hosts resolve kinds without threading the frame type through code that never touches frames. Built after registration from the registries’ id sets; host-handled ids (internal pages, ingest markers) are the host’s own vocabulary and deliberately absent.
- Engine
Kinds - Which registries hold an engine id. An id may be held by more than one kind (a smolweb format can have both a block engine for cards and a session engine for tiles); the HOST picks by surface context, so this is reported as flags, not a single kind.
- Host
Mutation - One host-driven DOM change, named in engine-neutral terms.
- Host
Mutation Report - What one
DocumentSession::apply_host_mutationsbatch actually did. - Outline
Entry - One element in the structural outline.
- Session
Document Request - Spawns retained document sessions for the engine id it claims. Registered once per host; holds its lane’s construction seams (fetcher, cookie jar, theme) so the spawn request stays plain data. Exact document request intent, independent of any transport crate.
- Session
Encoded Form Submission - Session
External Texture Draw - A same-device producer texture placed within the latest session frame. Keys identify host-registered textures, never arbitrary document resources.
- Session
Form Submission - A form submission assembled by the engine from its retained form state. The host still owns URL resolution, transport, policy, and navigation.
- Session
Input Result - Complete result of one input dispatch, including presentation requests that belong to the host adapter rather than the document engine.
- Session
Link - A link the session exposes for the host’s hit table: url + viewport-space
rect (
[x, y, w, h], the shape the lanes already emit). - Session
Modifiers - Modifier state carried with host-neutral session input.
- Session
Pending Work - Work a hosted document still owns after the current turn.
- Session
Registry - Session engines keyed by engine id, one registry per host frame type.
- Session
Request Spawn Result - Session
Spawn Request - Plain-data request to open a document session. The body is already
fetched when the host has it (mirroring
EngineInput); a session engine whose lane fetches for itself (subresources, redirects) uses the seams it was constructed with. - Session
Text Target - A semantic text occurrence resolved to lane-local pointer coordinates.
Enums§
- Document
Clip Artifact Role - The relationship between retained bytes and the representation observed by a document engine.
- Document
Find Direction - Direction for stepping a retained document find model.
- Document
Find Reveal - How selecting a match is revealed by its owning engine.
- Host
Mutation Op - What a
HostMutationdoes to its target. The four shapes the T3 instrument needs: replace an attribute (style,class), drop one, grow the subtree, shrink it. - Session
Button State - Press/release state shared by pointer and keyboard events.
- Session
Click - What a click did, unifying the lanes’ divergent returns
(
ClickOutcome/bool/Option<String>). - Session
Cursor - Cursor requested by the retained content under the pointer.
- Session
Effect - Semantic effect of one session input. Navigation remains a host action; sessions name the target or submission and never fetch a replacement page.
- Session
Error - Session
Focus Direction - Direction requested by focus traversal.
- Session
Form Method - The transport method requested by a form submission.
- Session
Ime - Platform composition lifecycle translated without exposing a windowing crate to document engines.
- Session
Input - Input delivered by a host to one retained session. For a printable key,
send
Keyfirst and then its producedKeyboardText.Keyowns keyboard events and non-text defaults;KeyboardTextowns that key’s character edit and can be suppressed by a canceled keydown.Textis independent input, including paste and accessibility, and is never canceled by an earlier key. An IME commit usesIme::Commit. Send control keys such as Enter only asKey; independentTextmay contain newlines. - Session
Key - Keyboard keys with document-level meaning. Text-bearing keys retain the produced character string so this vocabulary does not assume ASCII.
- Session
Navigation Command - Navigation commands owned by the host around a retained session.
- Session
Pointer Button - Pointer buttons understood by a retained document session.
- Session
Scroll Key - Keyboard scroll intents, host-neutral. Adapters map these onto their document lane’s own scroll vocabulary; this contract does not drag a layout dependency into Inker.
Traits§
- Document
Session - A live document: a retained layout session producing paint frames.
- Session
Engine
Functions§
- dispatch_
session_ input - The compatibility input dispatcher, shared by lanes which clear pending request state before delegating to these actual interaction hooks.