#[non_exhaustive]pub struct WaitForFunctionOptions {
pub polling_interval: Option<f64>,
pub timeout: Option<f64>,
}Expand description
Options for wait_for_function() on Page, Frame and Locator.
See: https://playwright.dev/docs/api/class-page#page-wait-for-function
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.polling_interval: Option<f64>Poll every N milliseconds instead of on each animation frame.
Leaving this unset polls on requestAnimationFrame, which is
Playwright’s default and the right choice for anything driven by
rendering. Set it when waiting on something the page changes off-frame,
such as a timer or a network callback.
Applies to the page-global form only. Locator::wait_for_function
polls on the driver’s own backoff schedule and ignores this.
timeout: Option<f64>Maximum time to wait, in milliseconds.
Implementations§
Trait Implementations§
Source§impl Clone for WaitForFunctionOptions
impl Clone for WaitForFunctionOptions
Source§fn clone(&self) -> WaitForFunctionOptions
fn clone(&self) -> WaitForFunctionOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WaitForFunctionOptions
impl Debug for WaitForFunctionOptions
Source§impl Default for WaitForFunctionOptions
impl Default for WaitForFunctionOptions
Source§fn default() -> WaitForFunctionOptions
fn default() -> WaitForFunctionOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WaitForFunctionOptions
impl RefUnwindSafe for WaitForFunctionOptions
impl Send for WaitForFunctionOptions
impl Sync for WaitForFunctionOptions
impl Unpin for WaitForFunctionOptions
impl UnsafeUnpin for WaitForFunctionOptions
impl UnwindSafe for WaitForFunctionOptions
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
Mutably borrows from an owned value. Read more