pub struct Waiter { /* private fields */ }Expand description
Waiter for synchronization operations
Implementations§
Source§impl Waiter
impl Waiter
Sourcepub fn with_options(options: WaitOptions) -> Self
pub fn with_options(options: WaitOptions) -> Self
Create with custom options
Sourcepub fn set_load_state(&mut self, state: LoadState)
pub fn set_load_state(&mut self, state: LoadState)
Set load state (for testing)
Sourcepub fn set_pending_requests(&mut self, count: usize)
pub fn set_pending_requests(&mut self, count: usize)
Update pending request count
Sourcepub fn record_event(&mut self, event: PageEvent)
pub fn record_event(&mut self, event: PageEvent)
Record an event
Sourcepub fn clear_events(&mut self)
pub fn clear_events(&mut self)
Clear recorded events
Sourcepub fn wait_for<C: WaitCondition>(
&self,
condition: &C,
options: &WaitOptions,
) -> ProbarResult<WaitResult>
pub fn wait_for<C: WaitCondition>( &self, condition: &C, options: &WaitOptions, ) -> ProbarResult<WaitResult>
Wait for a custom condition
Sourcepub fn wait_for_url(
&self,
pattern: &UrlPattern,
options: &WaitOptions,
) -> ProbarResult<WaitResult>
pub fn wait_for_url( &self, pattern: &UrlPattern, options: &WaitOptions, ) -> ProbarResult<WaitResult>
Wait for URL to match pattern
Sourcepub fn wait_for_load_state(
&self,
state: LoadState,
options: &WaitOptions,
) -> ProbarResult<WaitResult>
pub fn wait_for_load_state( &self, state: LoadState, options: &WaitOptions, ) -> ProbarResult<WaitResult>
Wait for load state
Wait for navigation to complete
Sourcepub fn wait_for_event(
&self,
event: &PageEvent,
options: &WaitOptions,
) -> ProbarResult<WaitResult>
pub fn wait_for_event( &self, event: &PageEvent, options: &WaitOptions, ) -> ProbarResult<WaitResult>
Wait for a page event to occur
Sourcepub fn wait_for_function<F>(
&self,
predicate: F,
options: &WaitOptions,
) -> ProbarResult<WaitResult>
pub fn wait_for_function<F>( &self, predicate: F, options: &WaitOptions, ) -> ProbarResult<WaitResult>
Wait for function/predicate to return true
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Waiter
impl RefUnwindSafe for Waiter
impl Send for Waiter
impl Sync for Waiter
impl Unpin for Waiter
impl UnsafeUnpin for Waiter
impl UnwindSafe for Waiter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().