pub struct DeviceControllerSynchronousProxy { /* private fields */ }
Implementations§
source§impl DeviceControllerSynchronousProxy
impl DeviceControllerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(
&self,
deadline: Time
) -> Result<DeviceControllerEvent, Error>
pub fn wait_for_event( &self, deadline: Time ) -> Result<DeviceControllerEvent, 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 connect_multiplexed(
&self,
server: Channel,
include_node: bool,
include_controller: bool
) -> Result<(), Error>
pub fn connect_multiplexed( &self, server: Channel, include_node: bool, include_controller: bool ) -> Result<(), Error>
Connect to the device’s FIDL, but also include other FIDLs multiplexed on the same channel.
- request
include_node
if this is true then include fuchsia.io/Node on the channel. - request
include_controller
if this is true then include fuchsia.device/Controller on the channel.
sourcepub fn connect_to_controller(
&self,
controller: ServerEnd<ControllerMarker>
) -> Result<(), Error>
pub fn connect_to_controller( &self, controller: ServerEnd<ControllerMarker> ) -> Result<(), Error>
Connect to the device’s fuchsia.device/Controller API.
sourcepub fn connect_to_device_protocol(&self, server: Channel) -> Result<(), Error>
pub fn connect_to_device_protocol(&self, server: Channel) -> Result<(), Error>
Connect to the device’s API.
NOTE: This is not multiplexed with fuchsia.io/Node or fuchsia.device/Controller.
sourcepub fn bind_driver(
&self,
driver_path: &str,
driver: Vmo,
___deadline: Time
) -> Result<(i32, Option<Channel>), Error>
pub fn bind_driver( &self, driver_path: &str, driver: Vmo, ___deadline: Time ) -> Result<(i32, Option<Channel>), Error>
Bind the requested driver to this device. driver_path
is informational,
but all calls to BindDriver/CreateDevice should use the same driver_path
each time they use a driver
VMO with the same contents. Returns a status
and optionally a channel to the driver’s test output. test_output
will be
not present unless the driver is configured to run its run_unit_tests hook, in
which case the other end of the channel will have been passed to the driver.
sourcepub fn connect_proxy_(&self, shadow: Channel) -> Result<(), Error>
pub fn connect_proxy_(&self, shadow: Channel) -> Result<(), Error>
Give this device a channel to its shadow in another process.
sourcepub fn init(&self, ___deadline: Time) -> Result<i32, Error>
pub fn init(&self, ___deadline: Time) -> Result<i32, Error>
Ask devhost to call the device init hook.
sourcepub fn unbind(
&self,
___deadline: Time
) -> Result<DeviceControllerUnbindResult, Error>
pub fn unbind( &self, ___deadline: Time ) -> Result<DeviceControllerUnbindResult, Error>
Ask devhost to unbind this device. On success, the remote end of this interface channel will close instead of returning a result.
sourcepub fn complete_removal(
&self,
___deadline: Time
) -> Result<DeviceControllerCompleteRemovalResult, Error>
pub fn complete_removal( &self, ___deadline: Time ) -> Result<DeviceControllerCompleteRemovalResult, Error>
Ask the devhost to complete the removal of this device, which previously had
invoked ScheduleRemove
. This is a special case that can be removed
once device_remove
invokes unbind
.