pub struct DeviceSynchronousProxy { /* private fields */ }Implementations§
Source§impl DeviceSynchronousProxy
impl DeviceSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<DeviceEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<DeviceEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn get_configuration(
&self,
___deadline: MonotonicInstant,
) -> Result<DeviceGetConfigurationResult, Error>
pub fn get_configuration( &self, ___deadline: MonotonicInstant, ) -> Result<DeviceGetConfigurationResult, Error>
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>],
___deadline: MonotonicInstant,
) -> Result<DeviceSetConfigurationResult, Error>
pub fn set_configuration( &self, device_desc: &DeviceDescriptor, config_descriptors: &[Vec<FunctionDescriptor>], ___deadline: MonotonicInstant, ) -> Result<DeviceSetConfigurationResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn clear_functions( &self, ___deadline: MonotonicInstant, ) -> Result<(), Error>
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 Debug for DeviceSynchronousProxy
impl Debug for DeviceSynchronousProxy
Source§impl From<Channel> for DeviceSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for DeviceSynchronousProxy
Source§impl From<DeviceSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<DeviceSynchronousProxy> for NullableHandle
Source§fn from(value: DeviceSynchronousProxy) -> Self
fn from(value: DeviceSynchronousProxy) -> Self
Source§impl FromClient for DeviceSynchronousProxy
Available on Fuchsia only.
impl FromClient for DeviceSynchronousProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
Source§fn from_client(value: ClientEnd<DeviceMarker>) -> Self
fn from_client(value: ClientEnd<DeviceMarker>) -> Self
Source§impl SynchronousProxy for DeviceSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for DeviceSynchronousProxy
Source§type Proxy = DeviceProxy
type Proxy = DeviceProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
Proxy controls.