pub struct DeviceControllerSynchronousProxy { /* private fields */ }

Implementations§

source§

impl DeviceControllerSynchronousProxy

source

pub fn new(channel: Channel) -> Self

source

pub fn into_channel(self) -> Channel

source

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.

source

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.
source

pub fn connect_to_controller( &self, controller: ServerEnd<ControllerMarker> ) -> Result<(), Error>

Connect to the device’s fuchsia.device/Controller API.

source

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.

source

pub fn bind_driver( &self, driver_path: &str, driver: Vmo, default_dispatcher_scheduler_role: &str, ___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.

  • request default_dispatcher_scheduler_role the scheduler role to set for the default dispatcher created for the driver. The scheduler role determines the thread pool that the dispatcher will be serviced by. This may be an empty string if the driver does not require the dispatcher to run in a specific thread pool. Setting a scheduler role is on a best-effort basis. If an invalid scheduler role is specified, the dispatcher will be serviced by the default thread pool, and this will not cause an error to be returned.
source

pub fn connect_proxy_(&self, shadow: Channel) -> Result<(), Error>

Give this device a channel to its shadow in another process.

source

pub fn init(&self, ___deadline: Time) -> Result<i32, Error>

Ask devhost to call the device init hook.

source

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.

source

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.

source

pub fn suspend(&self, flags: u32, ___deadline: Time) -> Result<i32, Error>

Ask devhost to suspend this device, using the target state indicated by flags.

source

pub fn resume( &self, target_system_state: u32, ___deadline: Time ) -> Result<i32, Error>

Ask devhost to resume this device, using the target system state indicated by ‘target_system_state’.

source

pub fn signal_made_visible(&self) -> Result<(), Error>

Informs the driver that it has been made visible in devfs.

Trait Implementations§

source§

impl Debug for DeviceControllerSynchronousProxy

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl SynchronousProxy for DeviceControllerSynchronousProxy

§

type Proxy = DeviceControllerProxy

The async proxy for the same protocol.
§

type Protocol = DeviceControllerMarker

The protocol which this Proxy controls.
source§

fn from_channel(inner: Channel) -> Self

Create a proxy over the given channel.
source§

fn into_channel(self) -> Channel

Convert the proxy back into a channel.
source§

fn as_channel(&self) -> &Channel

Get a reference to the proxy’s underlying channel. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Encode<Ambiguous1> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T> Encode<Ambiguous2> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more