pub struct ScryForward { /* private fields */ }Expand description
The receiving side of a forward flip into a scry tile. Holds the carried view-state and drives the cookies → navigate → restore choreography across host frames.
Implementations§
Source§impl ScryForward
impl ScryForward
Sourcepub const RECEIVES: LayerSet
pub const RECEIVES: LayerSet
The layers scry can apply: SESSION (cookies), NAV (scroll; the URL is the navigation key), and FORM (refill). Not DOM (it re-fetches) nor VISUAL.
Sourcepub fn new(state: PortableViewState) -> Self
pub fn new(state: PortableViewState) -> Self
Build a receiver from the carried state. The carrier has already masked it to
the intersection of the donor’s offer and RECEIVES, so this
keeps whatever survived.
Sourcepub fn has_target(&self) -> bool
pub fn has_target(&self) -> bool
Whether there is a URL to navigate to. A flip with no URL cannot use the faithful re-fetch path; the host should fall back to the DOM-snapshot degrade path (or skip the flip) rather than drive this receiver.
Sourcepub fn begin(&mut self, surface: &mut dyn ScrySurface) -> Result<(), String>
pub fn begin(&mut self, surface: &mut dyn ScrySurface) -> Result<(), String>
Phase 1: set the carried cookies on the WebView store, then navigate. Cookies go on before navigation so the page loads authenticated. A no-op once begun. Cookie failures are non-fatal (logged by the host); a missing cookie degrades the session, it does not block the flip.
Phase 2: feed a nav signal. On the first successful Completed, run the
scroll + form restore by script and finish. A failed load also finishes (there
is nothing to restore onto a failed page). Ignored unless navigating.
Trait Implementations§
Source§impl FlipReceiver for ScryForward
scry receives a Carry::Forward by storing it for the host-driven pump. A
Carry::Back is meaningless for a secondary (it never re-roots), so it is
ignored. present only stages the flip; begin /
on_nav do the work across frames.
impl FlipReceiver for ScryForward
scry receives a Carry::Forward by storing it for the host-driven pump. A
Carry::Back is meaningless for a secondary (it never re-roots), so it is
ignored. present only stages the flip; begin /
on_nav do the work across frames.