pub struct DeviceControllerProxy { /* private fields */ }

Implementations§

source§

impl DeviceControllerProxy

source

pub fn new(channel: AsyncChannel) -> Self

Create a new Proxy for DeviceController

source

pub fn take_event_stream(&self) -> DeviceControllerEventStream

Get a Stream of events from the remote end of the DeviceController protocol

Panics

Panics if the event stream was already taken.

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 ) -> QueryResponseFut<(i32, Option<Channel>)>

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.

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) -> QueryResponseFut<i32>

Ask devhost to call the device init hook.

source

pub fn unbind(&self) -> QueryResponseFut<DeviceControllerUnbindResult>

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 ) -> QueryResponseFut<DeviceControllerCompleteRemovalResult>

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) -> QueryResponseFut<i32>

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

source

pub fn resume(&self, target_system_state: u32) -> QueryResponseFut<i32>

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

Trait Implementations§

source§

impl Clone for DeviceControllerProxy

source§

fn clone(&self) -> DeviceControllerProxy

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DeviceControllerProxy

source§

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

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

impl DeviceControllerProxyInterface for DeviceControllerProxy

source§

fn connect_multiplexed( &self, server: Channel, include_node: bool, include_controller: bool ) -> Result<(), Error>

source§

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

source§

fn connect_to_device_protocol(&self, server: Channel) -> Result<(), Error>

§

type BindDriverResponseFut = QueryResponseFut<(i32, Option<Channel>)>

source§

fn bind_driver( &self, driver_path: &str, driver: Vmo ) -> Self::BindDriverResponseFut

source§

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

§

type InitResponseFut = QueryResponseFut<i32>

source§

fn init(&self) -> Self::InitResponseFut

§

type UnbindResponseFut = QueryResponseFut<Result<(), i32>>

source§

fn unbind(&self) -> Self::UnbindResponseFut

§

type CompleteRemovalResponseFut = QueryResponseFut<Result<(), i32>>

source§

fn complete_removal(&self) -> Self::CompleteRemovalResponseFut

§

type SuspendResponseFut = QueryResponseFut<i32>

source§

fn suspend(&self, flags: u32) -> Self::SuspendResponseFut

§

type ResumeResponseFut = QueryResponseFut<i32>

source§

fn resume(&self, target_system_state: u32) -> Self::ResumeResponseFut

source§

impl Proxy for DeviceControllerProxy

§

type Protocol = DeviceControllerMarker

The protocol which this Proxy controls.
source§

fn from_channel(inner: AsyncChannel) -> Self

Create a proxy over the given channel.
source§

fn into_channel(self) -> Result<AsyncChannel, Self>

Attempt to convert the proxy back into a channel. Read more
source§

fn as_channel(&self) -> &AsyncChannel

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

fn is_closed(&self) -> bool

Returns true if the proxy has received the PEER_CLOSED signal.
§

fn on_closed<'a>(&'a self) -> OnSignals<'a>

Returns a future that completes when the proxy receives the PEER_CLOSED signal.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · 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

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

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

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

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 Twhere U: From<T>,

const: unstable · 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 = mem::align_of::<T>()

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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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