pub trait ExpectableStateExt: ExpectableState + Sized {
    // Required method
    fn when_satisfied(
        &self,
        expectation: Predicate<Self::State>,
        timeout: Duration
    ) -> BoxFuture<'_, Result<Self::State, Error>>;
}

Required Methods§

source

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.

Implementors§

source§

impl<T> ExpectableStateExt for T
where T: Send + Sync + 'static + ExpectableState + Sized, T::State: Send + Sync + 'static,