pub trait UsbProxyInterface: Send + Sync {
type ConnectToEndpointResponseFut: Future<Output = Result<UsbConnectToEndpointResult, Error>> + Send;
type GetDeviceSpeedResponseFut: Future<Output = Result<UsbSpeed, Error>> + Send;
type GetDeviceIdResponseFut: Future<Output = Result<u32, Error>> + Send;
type GetDeviceDescriptorResponseFut: Future<Output = Result<UsbDeviceDescriptor, Error>> + Send;
type GetConfigurationDescriptorResponseFut: Future<Output = Result<UsbGetConfigurationDescriptorResult, Error>> + Send;
type GetConfigurationResponseFut: Future<Output = Result<u8, Error>> + Send;
type SetConfigurationResponseFut: Future<Output = Result<UsbSetConfigurationResult, Error>> + Send;
type SetInterfaceResponseFut: Future<Output = Result<UsbSetInterfaceResult, Error>> + Send;
type ControlTransferResponseFut: Future<Output = Result<UsbControlTransferResult, Error>> + Send;
type EnableEndpointResponseFut: Future<Output = Result<UsbEnableEndpointResult, Error>> + Send;
type ResetEndpointResponseFut: Future<Output = Result<UsbResetEndpointResult, Error>> + Send;
// Required methods
fn connect_to_endpoint(
&self,
ep_addr: u8,
ep: ServerEnd<EndpointMarker>,
) -> Self::ConnectToEndpointResponseFut;
fn get_device_speed(&self) -> Self::GetDeviceSpeedResponseFut;
fn get_device_id(&self) -> Self::GetDeviceIdResponseFut;
fn get_device_descriptor(&self) -> Self::GetDeviceDescriptorResponseFut;
fn get_configuration_descriptor(
&self,
config: u8,
) -> Self::GetConfigurationDescriptorResponseFut;
fn get_configuration(&self) -> Self::GetConfigurationResponseFut;
fn set_configuration(
&self,
configuration: u8,
) -> Self::SetConfigurationResponseFut;
fn set_interface(
&self,
interface_number: u8,
alt_setting: u8,
) -> Self::SetInterfaceResponseFut;
fn control_transfer(
&self,
setup: &UsbSetup,
timeout_ns: i64,
write_data: &[u8],
) -> Self::ControlTransferResponseFut;
fn enable_endpoint(
&self,
ep_desc: &UsbEndpointDescriptor,
ss_com_desc: &UsbSsEpCompDescriptor,
enable: bool,
) -> Self::EnableEndpointResponseFut;
fn reset_endpoint(&self, ep_address: u8) -> Self::ResetEndpointResponseFut;
}Required Associated Types§
type ConnectToEndpointResponseFut: Future<Output = Result<UsbConnectToEndpointResult, Error>> + Send
type GetDeviceSpeedResponseFut: Future<Output = Result<UsbSpeed, Error>> + Send
type GetDeviceIdResponseFut: Future<Output = Result<u32, Error>> + Send
type GetDeviceDescriptorResponseFut: Future<Output = Result<UsbDeviceDescriptor, Error>> + Send
type GetConfigurationDescriptorResponseFut: Future<Output = Result<UsbGetConfigurationDescriptorResult, Error>> + Send
type GetConfigurationResponseFut: Future<Output = Result<u8, Error>> + Send
type SetConfigurationResponseFut: Future<Output = Result<UsbSetConfigurationResult, Error>> + Send
type SetInterfaceResponseFut: Future<Output = Result<UsbSetInterfaceResult, Error>> + Send
type ControlTransferResponseFut: Future<Output = Result<UsbControlTransferResult, Error>> + Send
type EnableEndpointResponseFut: Future<Output = Result<UsbEnableEndpointResult, Error>> + Send
type ResetEndpointResponseFut: Future<Output = Result<UsbResetEndpointResult, Error>> + Send
Required Methods§
fn connect_to_endpoint( &self, ep_addr: u8, ep: ServerEnd<EndpointMarker>, ) -> Self::ConnectToEndpointResponseFut
fn get_device_speed(&self) -> Self::GetDeviceSpeedResponseFut
fn get_device_id(&self) -> Self::GetDeviceIdResponseFut
fn get_device_descriptor(&self) -> Self::GetDeviceDescriptorResponseFut
fn get_configuration_descriptor( &self, config: u8, ) -> Self::GetConfigurationDescriptorResponseFut
fn get_configuration(&self) -> Self::GetConfigurationResponseFut
fn set_configuration( &self, configuration: u8, ) -> Self::SetConfigurationResponseFut
fn set_interface( &self, interface_number: u8, alt_setting: u8, ) -> Self::SetInterfaceResponseFut
fn control_transfer( &self, setup: &UsbSetup, timeout_ns: i64, write_data: &[u8], ) -> Self::ControlTransferResponseFut
fn enable_endpoint( &self, ep_desc: &UsbEndpointDescriptor, ss_com_desc: &UsbSsEpCompDescriptor, enable: bool, ) -> Self::EnableEndpointResponseFut
fn reset_endpoint(&self, ep_address: u8) -> Self::ResetEndpointResponseFut
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".