pub struct ShowDescriptors;Expand description
[A DescriptorVisitor] that just logs the descriptors to the debug stream
Trait Implementations§
Source§impl<'a> DescriptorVisitor<'a> for ShowDescriptors
impl<'a> DescriptorVisitor<'a> for ShowDescriptors
type Error = Infallible
Source§fn on_configuration(&mut self, c: &ConfigurationDescriptor<'_>) -> bool
fn on_configuration(&mut self, c: &ConfigurationDescriptor<'_>) -> bool
Return
false to stop iteration earlySource§fn on_interface(&mut self, i: &InterfaceDescriptor<'_>) -> bool
fn on_interface(&mut self, i: &InterfaceDescriptor<'_>) -> bool
Return
false to stop iteration earlySource§fn on_endpoint(
&mut self,
_i: &InterfaceDescriptor<'_>,
e: &EndpointDescriptor,
) -> bool
fn on_endpoint( &mut self, _i: &InterfaceDescriptor<'_>, e: &EndpointDescriptor, ) -> bool
Return
false to stop iteration earlySource§fn on_other(
&mut self,
_i: Option<&InterfaceDescriptor<'_>>,
d: &[u8],
) -> Result<bool, Self::Error>
fn on_other( &mut self, _i: Option<&InterfaceDescriptor<'_>>, d: &[u8], ) -> Result<bool, Self::Error>
Catches every sub-descriptor that isn’t an interface or endpoint:
CS_INTERFACE, CS_ENDPOINT, HID, vendor-specific, etc.
Return
Ok(false) to stop iteration early without an error, or Err(e) to stop with one.Auto Trait Implementations§
impl Freeze for ShowDescriptors
impl RefUnwindSafe for ShowDescriptors
impl Send for ShowDescriptors
impl Sync for ShowDescriptors
impl Unpin for ShowDescriptors
impl UnwindSafe for ShowDescriptors
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more