pub struct LoweredHost { /* private fields */ }Expand description
The host state a browser keeps for a lowered page. It owns no engine: every statement it
carries out borrows the engine the page runs on for exactly that statement
(LoweredHost::drive).
Implementations§
Source§impl LoweredHost
impl LoweredHost
Sourcepub fn of_page(page: Option<String>) -> Self
pub fn of_page(page: Option<String>) -> Self
The host of a program whose ## Page component page names (None for a program that
mounts nothing by itself): what its reload mounts again, and what Replay runs against
before any Mount of the test’s own.
Sourcepub fn unhandled_failure(&self) -> Option<&str>
pub fn unhandled_failure(&self) -> Option<&str>
The first action failure no handler absorbed, if any.
Sourcepub fn take_unhandled_failure(&mut self) -> Option<String>
pub fn take_unhandled_failure(&mut self) -> Option<String>
The first action failure no handler absorbed, taken — the program’s own failure once the program that hosts the page has finished.
Sourcepub fn unhandled_failure_site(&self) -> Option<u32>
pub fn unhandled_failure_site(&self) -> Option<u32>
Where the first unabsorbed failure happened, when the engine tracks it.
Sourcepub fn start<L: LoweredCalls + ?Sized>(
&mut self,
calls: &mut L,
auto_mounted: Option<String>,
main: impl FnOnce(&mut L) -> Result<(), String>,
) -> Result<(), DriveError>
pub fn start<L: LoweredCalls + ?Sized>( &mut self, calls: &mut L, auto_mounted: Option<String>, main: impl FnOnce(&mut L) -> Result<(), String>, ) -> Result<(), DriveError>
Start the page on calls: its main runs — the mount a ## Page performs by itself, and
whatever else the program does at the top level — and the page settles. A failing main is
the program’s failure. auto_mounted names the ## Page component the program mounts by
itself, if any (crate::page_host::auto_mounted_page_component) — set before main runs,
since a page’s own mount is not a Drive::Mount this host ever sees.
Sourcepub fn settle<L: LoweredCalls + ?Sized>(&mut self, calls: &mut L)
pub fn settle<L: LoweredCalls + ?Sized>(&mut self, calls: &mut L)
Deliver a popstate the page is owed and complete every request that has an answer — what the
host does after anything runs in the page (Driver::settle).
Sourcepub fn drive<L: LoweredCalls + ?Sized>(
&mut self,
calls: &mut L,
d: &Drive,
) -> Result<(), DriveError>
pub fn drive<L: LoweredCalls + ?Sized>( &mut self, calls: &mut L, d: &Drive, ) -> Result<(), DriveError>
Carry one driving statement out on the page calls runs, exactly as the browser host
would, then settle.
Trait Implementations§
Source§impl Default for LoweredHost
impl Default for LoweredHost
Source§fn default() -> LoweredHost
fn default() -> LoweredHost
Auto Trait Implementations§
impl Freeze for LoweredHost
impl !RefUnwindSafe for LoweredHost
impl !Send for LoweredHost
impl !Sync for LoweredHost
impl Unpin for LoweredHost
impl UnsafeUnpin for LoweredHost
impl !UnwindSafe for LoweredHost
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.