Skip to main content

Module api

Module api 

Source
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§

BackState
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 cookie crate 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.
FormValues
Form field values keyed by a stable selector. Best-effort across engines.
FrameHandle
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.
LayerSet
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.
PortableViewState
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.
SameSite
A cookie’s SameSite attribute (RFC 6265bis). Carried so the gating semantics survive a flip; None means unspecified (engines default it to Lax).

Traits§

FlipBack
A black-box secondary engine that can only surface a locator for flip-back.
FlipDonor
A glass-box primary engine that can export its full live state. Implemented by serval and nematic through their verso-* adapters.
FlipReceiver
An engine that can host a flipped page. A secondary receiver consumes a Carry::Forward by navigating; a primary receiver consumes a Carry::Back by re-fetching the URL and re-rendering from source.