pub async fn select_one_device_predicate<'a, T: Token + 'a, U: UiCallback + 'a>(
    stream: BoxStream<'a, TokenEvent<T>>,
    ui_callback: &'a U,
    predicate: fn(_: &CtapAuthenticator<'a, T, U>) -> bool
) -> Option<CtapAuthenticator<'a, T, U>>
Available on crate feature ctap2 only.
Expand description

Selects an authenticator device to use from a TokenEvent stream.

The first device matching these conditions is returned:

  1. any newly-connected device after enumeration has completed
  2. any device without a button (ie: NFC authenticator)
  3. a device which responds to Ctap20Authenticator::selection()