windows: hotplug: note that interfaces may not be ready

This commit is contained in:
Kevin Mehall 2024-07-28 16:12:57 -06:00
parent 70f7c22870
commit 9272da1de3

View file

@ -177,6 +177,13 @@ pub fn list_devices() -> Result<impl Iterator<Item = DeviceInfo>, Error> {
/// }
/// }
/// ```
///
/// ### Platform-specific notes:
///
/// * On Windows, the interfaces of a composite device might not be ready
/// when the `Connected` event is emitted. If you are immediately opening the device
/// and claiming an interface when receiving a `Connected` event,
/// you should retry after a short delay if opening or claiming fails.
pub fn watch_devices() -> Result<hotplug::HotplugWatch, Error> {
Ok(hotplug::HotplugWatch(platform::HotplugWatch::new()?))
}