Expand description
The engine-agnostic flip contract (was the verso-api crate).
A flip re-presents the same page through a different engine with the user’s
place and session carried across (see
verso_docs/technical_architecture/2026-06-10_compatibility_view_charter.md).
This module is the engine-agnostic contract: the portable view-state moved across
a flip, plus the donor / back / receiver traits. It depends on no engine and no
GPU layer. Per-engine adapters (crate::scry, [crate::serval], …) bridge concrete
engines to these traits; the crate::flip orchestrator pairs a donor with a
receiver and runs the flip choreography.
Structs§
- Back
State - The lean locator a black-box secondary (scry, weld, graft) can surface for a flip-back. The receiver re-roots from this — it re-fetches the URL and renders from source — and never reconstructs a live document out of the black box.
- Cookie
- A cookie in engine-agnostic terms, mirroring the RFC 6265bis record (the shape
the
cookiecrate uses, which both Mere’s netfetcher jar and Servo’s net jar build on). Adapters convert to/from the engine’s own cookie type; carrying the full record keeps a flip’s session lossless. - Form
Values - Form field values keyed by a stable selector. Best-effort across engines.
- Frame
Handle - An opaque reference to the donor’s last rendered frame, resolved by the host compositor. Texture plumbing stays the compositor’s (charter §2); verso only refers to a frame so a flip can cross-fade instead of flashing.
- Layer
Set - Which layers of view-state a carrier moves. Layers degrade, never block: a
carrier moves
donor.donates() & receiver.receives(), and any layer outside that intersection is simply dropped. - Portable
View State - The rich state a glass-box primary (serval, nematic) can export. Layered so it degrades gracefully (charter §3.1): a receiver takes the layers it supports and ignores the rest.
Enums§
- Carry
- What a receiver is asked to present.
- Same
Site - A cookie’s
SameSiteattribute (RFC 6265bis). Carried so the gating semantics survive a flip;Nonemeans unspecified (engines default it toLax).
Traits§
- Flip
Back - A black-box secondary engine that can only surface a locator for flip-back.
- Flip
Donor - A glass-box primary engine that can export its full live state. Implemented by
serval and nematic through their
verso-*adapters. - Flip
Receiver - An engine that can host a flipped page. A secondary receiver consumes a
Carry::Forwardby navigating; a primary receiver consumes aCarry::Backby re-fetching the URL and re-rendering from source.