// Returns a Future that resolves when the bt-host transitions to a state that matches the
// predicate `target`.
//
// For example, if `target` is
//
//   expectation::host_driver::discoverable(true)
//     .and(expectation::host_driver::discovering(true));
//
// then the Future will resolve when the host driver becomes discoverable AND discovering. Other
// fields will be ignored.
//
// If the host driver is already in the requested state, then the Future will resolve the first
// time it gets polled.
Returns a Future that resolves when the bt-host transitions to a state that matches the
predicate `target`.

For example, if `target` is



then the Future will resolve when the host driver becomes discoverable AND discovering. Other
fields will be ignored.

If the host driver is already in the requested state, then the Future will resolve the first
time it gets polled.
Returns a Future that resolves when the bt - host transitions to a state that matches the predicate ` target ` . For example if ` target ` is then the Future will resolve when the host driver becomes discoverable AND discovering . Other fields will be ignored . If the host driver is already in the requested state then the Future will resolve the first time it gets polled .
pub async fn expect(&self, target: Predicate<AdapterState>) -> Result<AdapterState, Error> {
        let err_msg = format!("timed out waiting for host driver state (expected: {:?})", target);
        await!(HostDriverStateFuture::new(self.clone(), target)
            .on_timeout(timeout_duration().after_now(), move || Err(BtError::new(&err_msg).into())))
    }
pub async fn expect ( & self , target : Predicate < AdapterState > ) -> Result < AdapterState , Error > { let err_msg = format ! ( " " target ) ; await ! ( HostDriverStateFuture new ( self clone ( ) target ) on_timeout ( timeout_duration ( ) after_now ( ) move Err ( BtError new ( err_msg ) into ( ) ) ) ) }
Returns a Future that resolves when the bt-host transitions to a state that matches the
predicate `target`.
Returns a Future that resolves when the bt - host transitions to a state that matches the predicate ` target ` .
&self
target
Predicate<AdapterState>