pub struct ExpectPoll<F> { /* private fields */ }Expand description
Poll a generic async function until its return value satisfies a
matcher. Matches Playwright’s expect.poll().
Implementations§
Source§impl<F, Fut, T> ExpectPoll<F>
impl<F, Fut, T> ExpectPoll<F>
pub fn with_intervals(self, intervals: Vec<u64>) -> Self
Sourcepub async fn to_equal(self, expected: T) -> Result<(), AssertionFailure>
pub async fn to_equal(self, expected: T) -> Result<(), AssertionFailure>
Assert the polled value equals the expected value.
Sourcepub async fn to_satisfy(
self,
predicate: impl Fn(&T) -> bool,
description: &str,
) -> Result<(), AssertionFailure>
pub async fn to_satisfy( self, predicate: impl Fn(&T) -> bool, description: &str, ) -> Result<(), AssertionFailure>
Assert the polled value satisfies a predicate.
Auto Trait Implementations§
impl<F> Freeze for ExpectPoll<F>where
F: Freeze,
impl<F> RefUnwindSafe for ExpectPoll<F>where
F: RefUnwindSafe,
impl<F> Send for ExpectPoll<F>where
F: Send,
impl<F> Sync for ExpectPoll<F>where
F: Sync,
impl<F> Unpin for ExpectPoll<F>where
F: Unpin,
impl<F> UnsafeUnpin for ExpectPoll<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for ExpectPoll<F>where
F: UnwindSafe,
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