CapabilitiesSynchronousProxy

Struct CapabilitiesSynchronousProxy 

Source
pub struct CapabilitiesSynchronousProxy { /* private fields */ }

Implementations§

Source§

impl CapabilitiesSynchronousProxy

Source

pub fn new(channel: Channel) -> Self

Source

pub fn into_channel(self) -> Channel

Source

pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<CapabilitiesEvent, 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 connector_create( &self, connector: EventPair, receiver_client_end: ClientEnd<ReceiverMarker>, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesConnectorCreateResult, Error>

Creates a reference to a new connector capability. When the connector is opened, the channel given to the open call will be sent over receiver_client_end.

Make sure this method returns before passing the handle’s peer to other methods in this API. The creation may not be complete before then.

Source

pub fn dir_connector_create( &self, dir_connector: EventPair, receiver_client_end: ClientEnd<DirReceiverMarker>, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesDirConnectorCreateResult, Error>

Creates a reference to a new directory connector capability. When the directory connector is opened, the channel given to the open call will be sent over receiver_client_end.

Make sure this method returns before passing the handle’s peer to other methods in this API. The creation may not be complete before then.

Source

pub fn dictionary_create( &self, dictionary: EventPair, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesDictionaryCreateResult, Error>

Creates a reference to a new dictionary capability.

Make sure this method returns before passing the handle’s peer to other methods in this API. The creation may not be complete before then.

Source

pub fn data_create( &self, data_handle: EventPair, data: &Data, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesDataCreateResult, Error>

Creates a reference to a new data capability with the given value.

Make sure this method returns before passing the handle’s peer to other methods in this API. The creation may not be complete before then.

Source

pub fn connector_router_create( &self, router: EventPair, router_client_end: ClientEnd<ConnectorRouterMarker>, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesConnectorRouterCreateResult, Error>

Creates a reference to a new router capability that will return a connector capability when used.

Make sure this method returns before passing the handle’s peer to other methods in this API. The creation may not be complete before then.

Source

pub fn dir_connector_router_create( &self, router: EventPair, router_client_end: ClientEnd<DirConnectorRouterMarker>, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesDirConnectorRouterCreateResult, Error>

Creates a reference to a new router capability that will return a directory connector capability when used.

Make sure this method returns before passing the handle’s peer to other methods in this API. The creation may not be complete before then.

Source

pub fn dictionary_router_create( &self, router: EventPair, router_client_end: ClientEnd<DictionaryRouterMarker>, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesDictionaryRouterCreateResult, Error>

Creates a reference to a new router capability that will return a dictionary capability when used.

Make sure this method returns before passing the handle’s peer to other methods in this API. The creation may not be complete before then.

Source

pub fn data_router_create( &self, router: EventPair, router_client_end: ClientEnd<DataRouterMarker>, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesDataRouterCreateResult, Error>

Creates a reference to a new router capability that will return a data value when used.

Make sure this method returns before passing the handle’s peer to other methods in this API. The creation may not be complete before then.

Source

pub fn connector_open( &self, connector: EventPair, channel: Channel, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesConnectorOpenResult, Error>

Uses the provided connector to open a new connection by delivering this channel to whoever created the connector.

If there is an error, it will be reported as a zx.Status epitaph on channel.

If the connector event pair handle is not correlated with a handle given to ConnectorCreate, this connection will be closed.

Source

pub fn dir_connector_open( &self, payload: CapabilitiesDirConnectorOpenRequest, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesDirConnectorOpenResult, Error>

Uses the provided dir_connector to open a new directory connection by delivering this channel to whoever created the directory connector.

If there is an error, it will be reported as a zx.Status epitaph on channel.

If the dir_connector event pair handle is not correlated with a handle given to DirConnectorCreate, this connection will be closed.

dir_connector and channel are both required. rights and subdir may be omitted.

Source

pub fn dictionary_insert( &self, dictionary: EventPair, key: &str, value: EventPair, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesDictionaryInsertResult, Error>

Inserts a new capability into this Dictionary under the name key. Overwrites any existing entry.

Source

pub fn dictionary_get( &self, dictionary: EventPair, key: &str, value: EventPair, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesDictionaryGetResult, Error>

Creates a new reference to the capability named key in this dictionary, if that capability exists. That capability will remain in the dictionary. To take a capability out of the dictionary, use DictionaryRemove.

If key does not exist, value will not reference any capability and the NO_SUCH_CAPABILITY error value will be returned.

Make sure this method returns before passing the handle’s peer to other methods in this API. The creation may not be complete before then.

Source

pub fn dictionary_remove( &self, payload: CapabilitiesDictionaryRemoveRequest, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesDictionaryRemoveResult, Error>

Removes the capability named key from this dictionary and returns a reference to it, if that capability exists.

dictionary and key are required. capability is optional, and when set will become associated with the capability that was removed from the dictionary.

If key does not exist, value will not reference any capability and the NO_SUCH_CAPABILITY error value will be returned.

Make sure this method returns before passing the peer of capability to other methods in this API. The creation may not be complete before then.

Source

pub fn dictionary_iterate_keys( &self, dictionary: EventPair, key_iterator: ServerEnd<DictionaryKeyIteratorMarker>, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesDictionaryIterateKeysResult, Error>

Opens an iterator which can be used to iterate over the keys of this dictionary.

Source

pub fn data_get( &self, data_handle: EventPair, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesDataGetResult, Error>

Returns the Data value that was provided to the DataCreate call used with data_handle.

Source

pub fn connector_router_route( &self, router: EventPair, request: RouteRequest, connector: EventPair, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesConnectorRouterRouteResult, Error>

Attempts to produce a Connector capability from this ConnectorRouter.

Make sure this method returns before passing the peer of capability to other methods in this API. The creation may not be complete before then.

Source

pub fn dir_connector_router_route( &self, router: EventPair, request: RouteRequest, dir_connector: EventPair, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesDirConnectorRouterRouteResult, Error>

Attempts to produce a DirConnector capability from this DirConnectorRouter. This will return:

  • A DirConnector if the operation is successful.
  • An empty value if there is no issue found but the capability is not being provided (for example, an optional route ended in an offer from void).
  • An error, if the operation failed.
Source

pub fn dictionary_router_route( &self, router: EventPair, request: RouteRequest, dictionary: EventPair, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesDictionaryRouterRouteResult, Error>

Attempts to produce a Dictionary capability from this DictionaryRouter. This will return:

  • A Dictionary if the operation is successful.
  • An empty value if there is no issue found but the capability is not being provided (for example, an optional route ended in an offer from void).
  • An error, if the operation failed.
Source

pub fn data_router_route( &self, router: EventPair, request: RouteRequest, data_handle: i32, ___deadline: MonotonicInstant, ) -> Result<CapabilitiesDataRouterRouteResult, Error>

Attempts to produce a Data value from this DataRouter. This will return:

  • A Data value if the operation is successful.
  • An empty value if there is no issue found but the capability is not being provided (for example, an optional route ended in an offer from void).
  • An error, if the operation failed.

Trait Implementations§

Source§

impl Debug for CapabilitiesSynchronousProxy

Source§

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

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

impl From<CapabilitiesSynchronousProxy> for Handle

Available on Fuchsia only.
Source§

fn from(value: CapabilitiesSynchronousProxy) -> Self

Converts to this type from the input type.
Source§

impl From<Channel> for CapabilitiesSynchronousProxy

Available on Fuchsia only.
Source§

fn from(value: Channel) -> Self

Converts to this type from the input type.
Source§

impl FromClient for CapabilitiesSynchronousProxy

Available on Fuchsia only.
Source§

type Protocol = CapabilitiesMarker

The protocol.
Source§

fn from_client(value: ClientEnd<CapabilitiesMarker>) -> Self

Converts from a client.
Source§

impl SynchronousProxy for CapabilitiesSynchronousProxy

Available on Fuchsia only.
Source§

type Proxy = CapabilitiesProxy

The async proxy for the same protocol.
Source§

type Protocol = CapabilitiesMarker

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

fn is_closed(&self) -> Result<bool, Status>

Returns true if the proxy has received the PEER_CLOSED signal. 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
Source§

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

Source§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _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, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

Source§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _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, 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>,

Source§

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

Source§

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.