Re: [RFC PATCH v2 10/11] rust: usb: keep usb::Device private and gate transfers on Interface<Bound>
From: Danilo Krummrich
Date: Mon Jul 06 2026 - 07:03:31 EST
On Fri Jul 3, 2026 at 5:00 AM CEST, Mike Lothian wrote:
> - Add `Interface::as_bound()` for drivers that keep a refcounted
> `ARef<Interface>` and perform transfers from a deferred context (a work
> item), with a safety contract requiring the work be flushed before unbind.
There's no need for this, drivers should have a bound device (or interface in
this case) where it is needed.
If you hit the case where you need an unsafe as_bound() method, it means that
either your design has issues or the corresponding infrastructure that considers
it isn't available yet.