From 9272da1de3b5fb0a40ef19e1ce3166f397f88d2a Mon Sep 17 00:00:00 2001 From: Kevin Mehall Date: Sun, 28 Jul 2024 16:12:57 -0600 Subject: [PATCH] windows: hotplug: note that interfaces may not be ready --- src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 553309b..8fa2b36 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -177,6 +177,13 @@ pub fn list_devices() -> Result, 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 { Ok(hotplug::HotplugWatch(platform::HotplugWatch::new()?)) }