pub struct UsbFunctionInterfaceProxy { /* private fields */ }Implementations§
Source§impl UsbFunctionInterfaceProxy
impl UsbFunctionInterfaceProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.usb.function/UsbFunctionInterface.
Sourcepub fn take_event_stream(&self) -> UsbFunctionInterfaceEventStream
pub fn take_event_stream(&self) -> UsbFunctionInterfaceEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn control(
&self,
setup: &UsbSetup,
write: &[u8],
) -> QueryResponseFut<UsbFunctionInterfaceControlResult, DefaultFuchsiaResourceDialect>
pub fn control( &self, setup: &UsbSetup, write: &[u8], ) -> QueryResponseFut<UsbFunctionInterfaceControlResult, DefaultFuchsiaResourceDialect>
Callback for handling ep0 control requests.
setup is the control request to handle.
write is the data to write to the endpoint.
read is the data to read from the endpoint.
Sourcepub fn set_configured(
&self,
configured: bool,
speed: UsbSpeed,
) -> QueryResponseFut<UsbFunctionInterfaceSetConfiguredResult, DefaultFuchsiaResourceDialect>
pub fn set_configured( &self, configured: bool, speed: UsbSpeed, ) -> QueryResponseFut<UsbFunctionInterfaceSetConfiguredResult, DefaultFuchsiaResourceDialect>
Inform the function driver when the USB device configured state changes.
Called with configured == true in response to a SET_CONFIGURATION
control request that selects a configuration that contains this
function. In this case, the function driver should use
[fuchsia.hardware.usb.endpoint/Endpoint] to configure its endpoints.
Called with configured == false when configuration is disabled or USB
is disconnected. The function driver should then use
[fuchsia.hardware.usb.endpoint/Endpoint] to disable its endpoints.
Sourcepub fn set_interface(
&self,
interface: u8,
alt_setting: u8,
) -> QueryResponseFut<UsbFunctionInterfaceSetInterfaceResult, DefaultFuchsiaResourceDialect>
pub fn set_interface( &self, interface: u8, alt_setting: u8, ) -> QueryResponseFut<UsbFunctionInterfaceSetInterfaceResult, DefaultFuchsiaResourceDialect>
Called to set an alternate setting for an interface due to a
SET_INTERFACE control request.
The function driver should use
[fuchsia.hardware.usb.endpoint/Endpoint] to configure or disable the
interface’s endpoints as appropriate.
Trait Implementations§
Source§impl Clone for UsbFunctionInterfaceProxy
impl Clone for UsbFunctionInterfaceProxy
Source§fn clone(&self) -> UsbFunctionInterfaceProxy
fn clone(&self) -> UsbFunctionInterfaceProxy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UsbFunctionInterfaceProxy
impl Debug for UsbFunctionInterfaceProxy
Source§impl Proxy for UsbFunctionInterfaceProxy
impl Proxy for UsbFunctionInterfaceProxy
Source§type Protocol = UsbFunctionInterfaceMarker
type Protocol = UsbFunctionInterfaceMarker
Proxy controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Source§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Source§fn on_closed(&self) -> OnSignals<'_, Unowned<'_, NullableHandle>>
fn on_closed(&self) -> OnSignals<'_, Unowned<'_, NullableHandle>>
PEER_CLOSED signal.