#[non_exhaustive]pub struct WaitForFunctionOptions {
pub timeout: Option<f64>,
pub polling_interval: Option<f64>,
}Expand description
Options for Page::wait_for_function / Frame::wait_for_function.
Polls expression until it yields a truthy value (or timeout elapses).
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.timeout: Option<f64>Maximum time to wait, in milliseconds. Defaults to the page’s default
timeout (30s) when None.
polling_interval: Option<f64>Time to wait between evaluations, in milliseconds. Defaults to 100ms.
Implementations§
Source§impl WaitForFunctionOptions
impl WaitForFunctionOptions
pub fn new() -> Self
Sourcepub fn timeout_ms(self, v: f64) -> Self
pub fn timeout_ms(self, v: f64) -> Self
Set the maximum wait time in milliseconds.
Sourcepub fn polling_interval_ms(self, v: f64) -> Self
pub fn polling_interval_ms(self, v: f64) -> Self
Set the time between polls in milliseconds (default 100).
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