pub struct DeviceProxy { /* private fields */ }Implementations§
Source§impl DeviceProxy
impl DeviceProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.usb.peripheral/Device.
Sourcepub fn take_event_stream(&self) -> DeviceEventStream
pub fn take_event_stream(&self) -> DeviceEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_configuration(
&self,
) -> QueryResponseFut<DeviceGetConfigurationResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_configuration( &self, ) -> QueryResponseFut<DeviceGetConfigurationResult, DefaultFuchsiaResourceDialect> ⓘ
Retrieves the current device descriptor and active configuration descriptors.
Returns the active USB device descriptor and all associated configuration descriptors registered with the peripheral device manager.
- error:
ZX_ERR_BAD_STATE: The peripheral device has not been configured.
Sourcepub fn set_configuration(
&self,
device_desc: &DeviceDescriptor,
config_descriptors: &[Vec<FunctionDescriptor>],
) -> QueryResponseFut<DeviceSetConfigurationResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn set_configuration( &self, device_desc: &DeviceDescriptor, config_descriptors: &[Vec<FunctionDescriptor>], ) -> QueryResponseFut<DeviceSetConfigurationResult, DefaultFuchsiaResourceDialect> ⓘ
Sets the device’s descriptors, adds the functions and creates the child devices for the configuration’s interfaces. At least one function descriptor must be provided.
Sourcepub fn clear_functions(
&self,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect> ⓘ
pub fn clear_functions( &self, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect> ⓘ
Tells the device to remove the child devices for the configuration’s interfaces
and reset the list of functions to empty.
The caller should wait for the FunctionsCleared event.
Sourcepub fn set_state_change_listener(
&self,
listener: ClientEnd<EventsMarker>,
) -> Result<(), Error>
pub fn set_state_change_listener( &self, listener: ClientEnd<EventsMarker>, ) -> Result<(), Error>
Adds a state change listener that is invoked when a state change completes.
Trait Implementations§
Source§impl Clone for DeviceProxy
impl Clone for DeviceProxy
Source§fn clone(&self) -> DeviceProxy
fn clone(&self) -> DeviceProxy
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 DeviceProxy
impl Debug for DeviceProxy
Source§impl DeviceProxyInterface for DeviceProxy
impl DeviceProxyInterface for DeviceProxy
type GetConfigurationResponseFut = QueryResponseFut<Result<(DeviceDescriptor, Vec<Vec<FunctionDescriptor>>), i32>>
type SetConfigurationResponseFut = QueryResponseFut<Result<(), i32>>
type ClearFunctionsResponseFut = QueryResponseFut<()>
fn get_configuration(&self) -> Self::GetConfigurationResponseFut
fn set_configuration( &self, device_desc: &DeviceDescriptor, config_descriptors: &[Vec<FunctionDescriptor>], ) -> Self::SetConfigurationResponseFut
fn clear_functions(&self) -> Self::ClearFunctionsResponseFut
fn set_state_change_listener( &self, listener: ClientEnd<EventsMarker>, ) -> Result<(), Error>
Source§impl Proxy for DeviceProxy
impl Proxy for DeviceProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
Proxy controls.