pub struct TargetMessageFuture<T> { /* private fields */ }Implementations§
Source§impl<T> TargetMessageFuture<T>
impl<T> TargetMessageFuture<T>
pub fn new( target_sender: PageSender, message: TargetMessage, rx_request: Receiver<T>, request_timeout: Duration, ) -> Self
Wait for the main-frame navigation to finish.
This triggers a TargetMessage::WaitForNavigation and resolves with
the final ArcHttpRequest associated with that navigation (if any).
Sourcepub fn wait_for_dom_content_loaded(
target_sender: PageSender,
request_timeout: Duration,
) -> TargetMessageFuture<ArcHttpRequest> ⓘ
pub fn wait_for_dom_content_loaded( target_sender: PageSender, request_timeout: Duration, ) -> TargetMessageFuture<ArcHttpRequest> ⓘ
Wait for DOMContentLoaded — fires once the HTML is fully parsed and
synchronous scripts have executed, but before subresources (images,
fonts, late XHRs) finish loading. Much faster than wait_for_navigation
through slow proxies.
Sourcepub fn wait_for_network_idle(
target_sender: PageSender,
request_timeout: Duration,
) -> TargetMessageFuture<ArcHttpRequest> ⓘ
pub fn wait_for_network_idle( target_sender: PageSender, request_timeout: Duration, ) -> TargetMessageFuture<ArcHttpRequest> ⓘ
Wait until the main frame reaches networkIdle.
This triggers a TargetMessage::WaitForNetworkIdle and resolves with
the ArcHttpRequest associated with the navigation that led to the
idle state (if any).
Sourcepub fn reset_deadline(self: Pin<&mut Self>)
pub fn reset_deadline(self: Pin<&mut Self>)
Reset the internal timer deadline to now + request_timeout.
Used by HttpFuture to start the navigation timeout only after
the command phase completes, not from future creation time.
Sourcepub fn wait_for_network_almost_idle(
target_sender: PageSender,
request_timeout: Duration,
) -> TargetMessageFuture<ArcHttpRequest> ⓘ
pub fn wait_for_network_almost_idle( target_sender: PageSender, request_timeout: Duration, ) -> TargetMessageFuture<ArcHttpRequest> ⓘ
Wait until the main frame reaches networkAlmostIdle.
This triggers a TargetMessage::WaitForNetworkAlmostIdle and resolves
with the ArcHttpRequest associated with that navigation (if any).
Trait Implementations§
Source§impl<T> Future for TargetMessageFuture<T>
impl<T> Future for TargetMessageFuture<T>
impl<'__pin, T> Unpin for TargetMessageFuture<T>where
PinnedFieldsOf<__Origin<'__pin, T>>: Unpin,
Auto Trait Implementations§
impl<T> !Freeze for TargetMessageFuture<T>
impl<T> !RefUnwindSafe for TargetMessageFuture<T>
impl<T> Send for TargetMessageFuture<T>where
T: Send,
impl<T> !Sync for TargetMessageFuture<T>
impl<T> !UnsafeUnpin for TargetMessageFuture<T>
impl<T> !UnwindSafe for TargetMessageFuture<T>
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn map<U, F>(self, f: F) -> Map<Self, F>
fn map<U, F>(self, f: F) -> Map<Self, F>
Source§fn map_into<U>(self) -> MapInto<Self, U>
fn map_into<U>(self) -> MapInto<Self, U>
Source§fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
f. Read moreSource§fn left_future<B>(self) -> Either<Self, B>
fn left_future<B>(self) -> Either<Self, B>
Source§fn right_future<A>(self) -> Either<A, Self>
fn right_future<A>(self) -> Either<A, Self>
Source§fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
Source§fn flatten(self) -> Flatten<Self>
fn flatten(self) -> Flatten<Self>
Source§fn flatten_stream(self) -> FlattenStream<Self>
fn flatten_stream(self) -> FlattenStream<Self>
Source§fn fuse(self) -> Fuse<Self>where
Self: Sized,
fn fuse(self) -> Fuse<Self>where
Self: Sized,
poll will never again be called once it has
completed. This method can be used to turn any Future into a
FusedFuture. Read moreSource§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
Source§fn catch_unwind(self) -> CatchUnwind<Self>where
Self: Sized + UnwindSafe,
fn catch_unwind(self) -> CatchUnwind<Self>where
Self: Sized + UnwindSafe,
Source§fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
Source§fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>where
Self: Sized + 'a,
fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>where
Self: Sized + 'a,
Source§fn unit_error(self) -> UnitError<Self>where
Self: Sized,
fn unit_error(self) -> UnitError<Self>where
Self: Sized,
Future<Output = T> into a
TryFuture<Ok = T, Error = ()>.Source§fn never_error(self) -> NeverError<Self>where
Self: Sized,
fn never_error(self) -> NeverError<Self>where
Self: Sized,
Future<Output = T> into a
TryFuture<Ok = T, Error = Never>.