Skip to content

Commit

Permalink
windows: hotplug: note that interfaces may not be ready
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmehall committed Jul 29, 2024
1 parent 70f7c22 commit 9272da1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()?))
}

0 comments on commit 9272da1

Please sign in to comment.