pub async fn expect_peer(
        &self,
        id: Option<String>,
        target: Predicate<RemoteDevice>,
    ) -> Result<(), Error> {
        let err_msg = format!("timed out waiting for remote device state (expected: {:?})", target);
        await!(RemoteDeviceStateFuture::new(self.clone(), id, Some(target))
            .on_timeout(timeout_duration().after_now(), move || Err(BtError::new(&err_msg).into())))
    }
// Returns a Future that resolves when the state of a particular RemoteDevice matches
// `target`. If `id` is None, then the Future will resolve when any device matches
// `target`. Otherwise, the Future will resolve when the state of the requested device
// changes.
Returns a Future that resolves when the state of a particular RemoteDevice matches
`target`. If `id` is None, then the Future will resolve when any device matches
`target`. Otherwise, the Future will resolve when the state of the requested device
changes.
Returns a Future that resolves when the state of a particular RemoteDevice matches ` target ` . If ` id ` is None then the Future will resolve when any device matches ` target ` . Otherwise the Future will resolve when the state of the requested device changes .
pub async fn expect_peer(
        &self,
        id: Option<String>,
        target: Predicate<RemoteDevice>,
    ) -> Result<(), Error> {
        let err_msg = format!("timed out waiting for remote device state (expected: {:?})", target);
        await!(RemoteDeviceStateFuture::new(self.clone(), id, Some(target))
            .on_timeout(timeout_duration().after_now(), move || Err(BtError::new(&err_msg).into())))
    }
pub async fn expect_peer ( & self , id : Option < String > , target : Predicate < RemoteDevice > , ) -> Result < ( ) , Error > { let err_msg = format ! ( " " target ) ; await ! ( RemoteDeviceStateFuture new ( self clone ( ) id Some ( target ) ) on_timeout ( timeout_duration ( ) after_now ( ) move Err ( BtError new ( err_msg ) into ( ) ) ) ) }
Returns a Future that resolves when the state of a particular RemoteDevice matches
`target`.
Returns a Future that resolves when the state of a particular RemoteDevice matches ` target ` .
&self
id
Option<String>
target
Predicate<RemoteDevice>
&self
id
Option<String>
target
Predicate<RemoteDevice>