pub async fn expect_host_peer(
    host: &HostDriverHarness,
    target: Predicate<RemoteDevice>,
) -> Result<HostState, Error> {
    let fut = host.when_satisfied(
        Predicate::<HostState>::new(
            move |host| host.peers.iter().any(|(_, p)| target.satisfied(p)),
            None,
        ),
        timeout_duration(),
    );
    fut.await
}
// Returns a Future that resolves when the state of any RemoteDevice matches `target`.
Returns a Future that resolves when the state of any RemoteDevice matches `target`.
Returns a Future that resolves when the state of any RemoteDevice matches ` target ` .
pub async fn expect_host_peer(
    host: &HostDriverHarness,
    target: Predicate<RemoteDevice>,
) -> Result<HostState, Error> {
    let fut = host.when_satisfied(
        Predicate::<HostState>::new(
            move |host| host.peers.iter().any(|(_, p)| target.satisfied(p)),
            None,
        ),
        timeout_duration(),
    );
    fut.await
}
pub async fn expect_host_peer ( host : & HostDriverHarness , target : Predicate < RemoteDevice > , ) -> Result < HostState , Error > { let fut = host . when_satisfied ( Predicate :: < HostState > :: new ( move | host | host . peers . iter ( ) . any ( | ( _ , p ) | target . satisfied ( p ) ) , None , ) , timeout_duration ( ) , ) ; fut . await }
Returns a Future that resolves when the state of any RemoteDevice matches `target`.
Returns a Future that resolves when the state of any RemoteDevice matches ` target ` .
host
&HostDriverHarness
target
Predicate<RemoteDevice>