pub async fn wait_for_device_with<T>(
    dev_dir: &DirectoryProxy,
    predicate: impl Fn(DeviceInfo<'_>) -> Option<T>
) -> Result<T, Error>
Expand description

Watches the directory for a device for which the predicate returns Some(t) and returns t.