pub trait ExpectableStateExt: ExpectableState + Sized {
// Required method
fn when_satisfied(
&self,
expectation: Predicate<Self::State>,
timeout: Duration
) -> BoxFuture<'_, Result<Self::State, Error>>;
}
Required Methods§
sourcefn when_satisfied(
&self,
expectation: Predicate<Self::State>,
timeout: Duration
) -> BoxFuture<'_, Result<Self::State, Error>>
fn when_satisfied( &self, expectation: Predicate<Self::State>, timeout: Duration ) -> BoxFuture<'_, Result<Self::State, Error>>
Convenience method for awaiting expectations on the underlying state Provides a simple syntax for asynchronously awaiting expectations:
ⓘ
// Wait for the action to have completed one way or the other
let state = state.when_satisfied(action_complete, timeout).await?;
Object Safety§
This trait is not object safe.