Skip to main content

UsbFunctionProxyInterface

Trait UsbFunctionProxyInterface 

Source
pub trait UsbFunctionProxyInterface: Send + Sync {
    type ConnectToEndpointResponseFut: Future<Output = Result<UsbFunctionConnectToEndpointResult, Error>> + Send;
    type ConfigureResponseFut: Future<Output = Result<UsbFunctionConfigureResult, Error>> + Send;
    type DeconfigureResponseFut: Future<Output = Result<UsbFunctionDeconfigureResult, Error>> + Send;
    type AllocResourcesResponseFut: Future<Output = Result<UsbFunctionAllocResourcesResult, Error>> + Send;
    type EndpointSetStallResponseFut: Future<Output = Result<UsbFunctionEndpointSetStallResult, Error>> + Send;
    type EndpointClearStallResponseFut: Future<Output = Result<UsbFunctionEndpointClearStallResult, Error>> + Send;
    type ConfigureEndpointResponseFut: Future<Output = Result<UsbFunctionConfigureEndpointResult, Error>> + Send;
    type DisableEndpointResponseFut: Future<Output = Result<UsbFunctionDisableEndpointResult, Error>> + Send;

    // Required methods
    fn connect_to_endpoint(
        &self,
        ep_addr: u8,
        ep: ServerEnd<EndpointMarker>,
    ) -> Self::ConnectToEndpointResponseFut;
    fn configure(
        &self,
        configuration: &[u8],
        iface: ClientEnd<UsbFunctionInterfaceMarker>,
    ) -> Self::ConfigureResponseFut;
    fn deconfigure(&self) -> Self::DeconfigureResponseFut;
    fn alloc_resources(
        &self,
        interface_count: u8,
        endpoints: Vec<EndpointResource>,
        strings: &[String],
    ) -> Self::AllocResourcesResponseFut;
    fn endpoint_set_stall(
        &self,
        endpoint_address: u8,
    ) -> Self::EndpointSetStallResponseFut;
    fn endpoint_clear_stall(
        &self,
        endpoint_address: u8,
    ) -> Self::EndpointClearStallResponseFut;
    fn configure_endpoint(
        &self,
        endpoint_address: u8,
        endpoint_configuration: &EndpointConfiguration,
    ) -> Self::ConfigureEndpointResponseFut;
    fn disable_endpoint(
        &self,
        endpoint_address: u8,
    ) -> Self::DisableEndpointResponseFut;
}

Required Associated Types§

Required Methods§

Source

fn connect_to_endpoint( &self, ep_addr: u8, ep: ServerEnd<EndpointMarker>, ) -> Self::ConnectToEndpointResponseFut

Source

fn configure( &self, configuration: &[u8], iface: ClientEnd<UsbFunctionInterfaceMarker>, ) -> Self::ConfigureResponseFut

Source

fn deconfigure(&self) -> Self::DeconfigureResponseFut

Source

fn alloc_resources( &self, interface_count: u8, endpoints: Vec<EndpointResource>, strings: &[String], ) -> Self::AllocResourcesResponseFut

Source

fn endpoint_set_stall( &self, endpoint_address: u8, ) -> Self::EndpointSetStallResponseFut

Source

fn endpoint_clear_stall( &self, endpoint_address: u8, ) -> Self::EndpointClearStallResponseFut

Source

fn configure_endpoint( &self, endpoint_address: u8, endpoint_configuration: &EndpointConfiguration, ) -> Self::ConfigureEndpointResponseFut

Source

fn disable_endpoint( &self, endpoint_address: u8, ) -> Self::DisableEndpointResponseFut

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§