[−][src]Trait usbip::UsbInterfaceHandler
A handler of a custom usb interface
Required methods
fn get_class_specific_descriptor(&self) -> Vec<u8>
Return the class specific desciptor which is inserted between interface descriptor and endpoint descriptor
fn handle_urb(
&mut self,
interface: &UsbInterface,
ep: UsbEndpoint,
setup: SetupPacket,
req: &[u8]
) -> Result<Vec<u8>>
&mut self,
interface: &UsbInterface,
ep: UsbEndpoint,
setup: SetupPacket,
req: &[u8]
) -> Result<Vec<u8>>
Handle a URB(USB Request Block) targeting at this interface
Can be one of: control transfer to ep0 or other types of transfer to its endpoint
fn as_any(&mut self) -> &mut dyn Any
Helper to downcast to actual struct
Please implement it as:
ⓘThis example is not tested
fn as_any(&mut self) -> &mut dyn Any { self }
Implementors
impl UsbInterfaceHandler for UsbCdcAcmHandler
[src]
fn handle_urb(
&mut self,
_interface: &UsbInterface,
ep: UsbEndpoint,
_setup: SetupPacket,
req: &[u8]
) -> Result<Vec<u8>>
[src]
&mut self,
_interface: &UsbInterface,
ep: UsbEndpoint,
_setup: SetupPacket,
req: &[u8]
) -> Result<Vec<u8>>
fn get_class_specific_descriptor(&self) -> Vec<u8>
[src]
fn as_any(&mut self) -> &mut dyn Any
[src]
impl UsbInterfaceHandler for UsbHidKeyboardHandler
[src]
fn handle_urb(
&mut self,
_interface: &UsbInterface,
ep: UsbEndpoint,
setup: SetupPacket,
_req: &[u8]
) -> Result<Vec<u8>>
[src]
&mut self,
_interface: &UsbInterface,
ep: UsbEndpoint,
setup: SetupPacket,
_req: &[u8]
) -> Result<Vec<u8>>
fn get_class_specific_descriptor(&self) -> Vec<u8>
[src]
fn as_any(&mut self) -> &mut dyn Any
[src]
impl UsbInterfaceHandler for UsbHostHandler
[src]
fn handle_urb(
&mut self,
_interface: &UsbInterface,
ep: UsbEndpoint,
setup: SetupPacket,
req: &[u8]
) -> Result<Vec<u8>>
[src]
&mut self,
_interface: &UsbInterface,
ep: UsbEndpoint,
setup: SetupPacket,
req: &[u8]
) -> Result<Vec<u8>>