pub struct CoordinatorSynchronousProxy { /* private fields */ }

Implementations§

source§

impl CoordinatorSynchronousProxy

source

pub fn new(channel: Channel) -> Self

source

pub fn into_channel(self) -> Channel

source

pub fn wait_for_event(&self, deadline: Time) -> Result<CoordinatorEvent, 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 add_device( &self, args: &AddDeviceArgs, coordinator: ServerEnd<CoordinatorMarker>, device_controller: ClientEnd<DeviceControllerMarker>, inspect: Option<Vmo>, outgoing_dir: Option<ClientEnd<DirectoryMarker>>, ___deadline: Time ) -> Result<CoordinatorAddDeviceResult, Error>

Record the addition of a new device that can be communicated with via device_controller. On success, the returned local_device_id is the identifier assigned by devmgr.

source

pub fn schedule_remove(&self, unbind_self: bool) -> Result<(), Error>

Requests the devcoordinator schedule the removal of this device, and the unbinding of its children. If unbind_self is true, the unbind hook for this device will also be called.

source

pub fn schedule_unbind_children( &self, ___deadline: Time ) -> Result<CoordinatorScheduleUnbindChildrenResult, Error>

Requests the devcoordinator schedule the unbinding of this device’s children. If the device has no children, no request will be sent, and has_children will be false.

source

pub fn bind_device( &self, driver_url_suffix: Option<&str>, ___deadline: Time ) -> Result<CoordinatorBindDeviceResult, Error>

Attempt to bind a driver against this device.

  • request driver_url_suffix only driver’s that match this URL suffix will try to bind to the device (e.g: “fvm.cm”). If this is null, the API will autobind.
  • error ZX_ERR_ALREADY_BOUND if the device is already bound.
  • error ZX_ERR_NOT_FOUND no drivers were found.
source

pub fn get_topological_path( &self, ___deadline: Time ) -> Result<CoordinatorGetTopologicalPathResult, Error>

Returns the topological path of this device.

source

pub fn load_firmware( &self, driver_path: &str, fw_path: &str, ___deadline: Time ) -> Result<CoordinatorLoadFirmwareResult, Error>

Requests that the firmware at the given path be loaded and returned.

source

pub fn get_metadata( &self, key: u32, ___deadline: Time ) -> Result<CoordinatorGetMetadataResult, Error>

Retrieve the metadata blob associated with this device and the given key.

source

pub fn get_metadata_size( &self, key: u32, ___deadline: Time ) -> Result<CoordinatorGetMetadataSizeResult, Error>

Retrieve the metadata size associated with this device and the given key.

source

pub fn add_metadata( &self, key: u32, data: Option<&[u8]>, ___deadline: Time ) -> Result<CoordinatorAddMetadataResult, Error>

Add metadata blob associated with this device and the given key. If the same key is specified multiple times, the new data will be ignored in favor of the data from first call with the specified key.

source

pub fn add_composite_device( &self, name: &str, comp_desc: &CompositeDeviceDescriptor, ___deadline: Time ) -> Result<CoordinatorAddCompositeDeviceResult, Error>

Adds the given composite device. This causes the driver manager to try to match the fragments against the existing device tree, and to monitor all new device additions in order to find the fragments as they are created.

source

pub fn add_composite_node_spec( &self, name: &str, spec: &CompositeNodeSpecDescriptor, ___deadline: Time ) -> Result<CoordinatorAddCompositeNodeSpecResult, Error>

Adds the given composite node spec. This causes the driver manager to add the spec to the driver index, and then try to match the parents against the node topology. All device additions will be monitored to see if they matched to the remaining unbound nodes.

source

pub fn connect_fidl_protocol( &self, fragment_name: Option<&str>, service_name: Option<&str>, protocol_name: &str, server: Channel, ___deadline: Time ) -> Result<CoordinatorConnectFidlProtocolResult, Error>

Connects the given FIDL protocol inside of a FIDL service. Connection is completed asynchronously due to pipelining. Returning ZX_OK does not imply the service exists. A two way call to the service via the retained client end of the channel pair must be issued in order to ascertain whether the connection has been successfully established.

  • |fragment_name| should be specified if the parent is a composite node.
  • |service_name| should be specified if attempting to connect to a service. This will be mandatory in the future: http://fxbug.dev/107155.
  • error Reports ZX_ERR_UNAVAILABLE if the parent (or fragment) does not have an outgoing directory.
  • error Reports ZX_ERR_NOT_FOUND if |fragment_name| is not the name of a parent.
  • error Reports ZX_ERR_NOT_SUPPORTED if |fragment_name| is specified by the device is not a composite node

Trait Implementations§

source§

impl Debug for CoordinatorSynchronousProxy

source§

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

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

impl SynchronousProxy for CoordinatorSynchronousProxy

§

type Proxy = CoordinatorProxy

The async proxy for the same protocol.
§

type Protocol = CoordinatorMarker

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 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,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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.

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>,

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