pub struct CapabilitiesProxy { /* private fields */ }Implementations§
Source§impl CapabilitiesProxy
impl CapabilitiesProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.component.runtime/Capabilities.
Sourcepub fn take_event_stream(&self) -> CapabilitiesEventStream
pub fn take_event_stream(&self) -> CapabilitiesEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn connector_create(
&self,
connector: EventPair,
receiver_client_end: ClientEnd<ReceiverMarker>,
) -> QueryResponseFut<CapabilitiesConnectorCreateResult, DefaultFuchsiaResourceDialect>
pub fn connector_create( &self, connector: EventPair, receiver_client_end: ClientEnd<ReceiverMarker>, ) -> QueryResponseFut<CapabilitiesConnectorCreateResult, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn dir_connector_create(
&self,
dir_connector: EventPair,
receiver_client_end: ClientEnd<DirReceiverMarker>,
) -> QueryResponseFut<CapabilitiesDirConnectorCreateResult, DefaultFuchsiaResourceDialect>
pub fn dir_connector_create( &self, dir_connector: EventPair, receiver_client_end: ClientEnd<DirReceiverMarker>, ) -> QueryResponseFut<CapabilitiesDirConnectorCreateResult, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn dictionary_create(
&self,
dictionary: EventPair,
) -> QueryResponseFut<CapabilitiesDictionaryCreateResult, DefaultFuchsiaResourceDialect>
pub fn dictionary_create( &self, dictionary: EventPair, ) -> QueryResponseFut<CapabilitiesDictionaryCreateResult, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn data_create(
&self,
data_handle: EventPair,
data: &Data,
) -> QueryResponseFut<CapabilitiesDataCreateResult, DefaultFuchsiaResourceDialect>
pub fn data_create( &self, data_handle: EventPair, data: &Data, ) -> QueryResponseFut<CapabilitiesDataCreateResult, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn connector_router_create(
&self,
router: EventPair,
router_client_end: ClientEnd<ConnectorRouterMarker>,
) -> QueryResponseFut<CapabilitiesConnectorRouterCreateResult, DefaultFuchsiaResourceDialect>
pub fn connector_router_create( &self, router: EventPair, router_client_end: ClientEnd<ConnectorRouterMarker>, ) -> QueryResponseFut<CapabilitiesConnectorRouterCreateResult, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn dir_connector_router_create(
&self,
router: EventPair,
router_client_end: ClientEnd<DirConnectorRouterMarker>,
) -> QueryResponseFut<CapabilitiesDirConnectorRouterCreateResult, DefaultFuchsiaResourceDialect>
pub fn dir_connector_router_create( &self, router: EventPair, router_client_end: ClientEnd<DirConnectorRouterMarker>, ) -> QueryResponseFut<CapabilitiesDirConnectorRouterCreateResult, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn dictionary_router_create(
&self,
router: EventPair,
router_client_end: ClientEnd<DictionaryRouterMarker>,
) -> QueryResponseFut<CapabilitiesDictionaryRouterCreateResult, DefaultFuchsiaResourceDialect>
pub fn dictionary_router_create( &self, router: EventPair, router_client_end: ClientEnd<DictionaryRouterMarker>, ) -> QueryResponseFut<CapabilitiesDictionaryRouterCreateResult, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn data_router_create(
&self,
router: EventPair,
router_client_end: ClientEnd<DataRouterMarker>,
) -> QueryResponseFut<CapabilitiesDataRouterCreateResult, DefaultFuchsiaResourceDialect>
pub fn data_router_create( &self, router: EventPair, router_client_end: ClientEnd<DataRouterMarker>, ) -> QueryResponseFut<CapabilitiesDataRouterCreateResult, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn connector_open(
&self,
connector: EventPair,
channel: Channel,
) -> QueryResponseFut<CapabilitiesConnectorOpenResult, DefaultFuchsiaResourceDialect>
pub fn connector_open( &self, connector: EventPair, channel: Channel, ) -> QueryResponseFut<CapabilitiesConnectorOpenResult, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn dir_connector_open(
&self,
payload: CapabilitiesDirConnectorOpenRequest,
) -> QueryResponseFut<CapabilitiesDirConnectorOpenResult, DefaultFuchsiaResourceDialect>
pub fn dir_connector_open( &self, payload: CapabilitiesDirConnectorOpenRequest, ) -> QueryResponseFut<CapabilitiesDirConnectorOpenResult, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn dictionary_insert(
&self,
dictionary: EventPair,
key: &str,
value: EventPair,
) -> QueryResponseFut<CapabilitiesDictionaryInsertResult, DefaultFuchsiaResourceDialect>
pub fn dictionary_insert( &self, dictionary: EventPair, key: &str, value: EventPair, ) -> QueryResponseFut<CapabilitiesDictionaryInsertResult, DefaultFuchsiaResourceDialect>
Inserts a new capability into this Dictionary under the name key.
Overwrites any existing entry.
Sourcepub fn dictionary_get(
&self,
dictionary: EventPair,
key: &str,
value: EventPair,
) -> QueryResponseFut<CapabilitiesDictionaryGetResult, DefaultFuchsiaResourceDialect>
pub fn dictionary_get( &self, dictionary: EventPair, key: &str, value: EventPair, ) -> QueryResponseFut<CapabilitiesDictionaryGetResult, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn dictionary_remove(
&self,
payload: CapabilitiesDictionaryRemoveRequest,
) -> QueryResponseFut<CapabilitiesDictionaryRemoveResult, DefaultFuchsiaResourceDialect>
pub fn dictionary_remove( &self, payload: CapabilitiesDictionaryRemoveRequest, ) -> QueryResponseFut<CapabilitiesDictionaryRemoveResult, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn dictionary_iterate_keys(
&self,
dictionary: EventPair,
key_iterator: ServerEnd<DictionaryKeyIteratorMarker>,
) -> QueryResponseFut<CapabilitiesDictionaryIterateKeysResult, DefaultFuchsiaResourceDialect>
pub fn dictionary_iterate_keys( &self, dictionary: EventPair, key_iterator: ServerEnd<DictionaryKeyIteratorMarker>, ) -> QueryResponseFut<CapabilitiesDictionaryIterateKeysResult, DefaultFuchsiaResourceDialect>
Opens an iterator which can be used to iterate over the keys of this dictionary.
Sourcepub fn data_get(
&self,
data_handle: EventPair,
) -> QueryResponseFut<CapabilitiesDataGetResult, DefaultFuchsiaResourceDialect>
pub fn data_get( &self, data_handle: EventPair, ) -> QueryResponseFut<CapabilitiesDataGetResult, DefaultFuchsiaResourceDialect>
Returns the Data value that was provided to the DataCreate call used with
data_handle.
Sourcepub fn connector_router_route(
&self,
router: EventPair,
request: RouteRequest,
connector: EventPair,
) -> QueryResponseFut<CapabilitiesConnectorRouterRouteResult, DefaultFuchsiaResourceDialect>
pub fn connector_router_route( &self, router: EventPair, request: RouteRequest, connector: EventPair, ) -> QueryResponseFut<CapabilitiesConnectorRouterRouteResult, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn dir_connector_router_route(
&self,
router: EventPair,
request: RouteRequest,
dir_connector: EventPair,
) -> QueryResponseFut<CapabilitiesDirConnectorRouterRouteResult, DefaultFuchsiaResourceDialect>
pub fn dir_connector_router_route( &self, router: EventPair, request: RouteRequest, dir_connector: EventPair, ) -> QueryResponseFut<CapabilitiesDirConnectorRouterRouteResult, DefaultFuchsiaResourceDialect>
Attempts to produce a DirConnector capability from this
DirConnectorRouter. This will return:
- A
DirConnectorif 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.
Sourcepub fn dictionary_router_route(
&self,
router: EventPair,
request: RouteRequest,
dictionary: EventPair,
) -> QueryResponseFut<CapabilitiesDictionaryRouterRouteResult, DefaultFuchsiaResourceDialect>
pub fn dictionary_router_route( &self, router: EventPair, request: RouteRequest, dictionary: EventPair, ) -> QueryResponseFut<CapabilitiesDictionaryRouterRouteResult, DefaultFuchsiaResourceDialect>
Attempts to produce a Dictionary capability from this
DictionaryRouter. This will return:
- A
Dictionaryif 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.
Sourcepub fn data_router_route(
&self,
router: EventPair,
request: RouteRequest,
data_handle: i32,
) -> QueryResponseFut<CapabilitiesDataRouterRouteResult, DefaultFuchsiaResourceDialect>
pub fn data_router_route( &self, router: EventPair, request: RouteRequest, data_handle: i32, ) -> QueryResponseFut<CapabilitiesDataRouterRouteResult, DefaultFuchsiaResourceDialect>
Attempts to produce a Data value from this
DataRouter. This will return:
- A
Datavalue 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 CapabilitiesProxyInterface for CapabilitiesProxy
impl CapabilitiesProxyInterface for CapabilitiesProxy
type ConnectorCreateResponseFut = QueryResponseFut<Result<(), CapabilitiesError>>
type DirConnectorCreateResponseFut = QueryResponseFut<Result<(), CapabilitiesError>>
type DictionaryCreateResponseFut = QueryResponseFut<Result<(), CapabilitiesError>>
type DataCreateResponseFut = QueryResponseFut<Result<(), CapabilitiesError>>
type ConnectorRouterCreateResponseFut = QueryResponseFut<Result<(), CapabilitiesError>>
type DirConnectorRouterCreateResponseFut = QueryResponseFut<Result<(), CapabilitiesError>>
type DictionaryRouterCreateResponseFut = QueryResponseFut<Result<(), CapabilitiesError>>
type DataRouterCreateResponseFut = QueryResponseFut<Result<(), CapabilitiesError>>
type ConnectorOpenResponseFut = QueryResponseFut<Result<(), CapabilitiesError>>
type DirConnectorOpenResponseFut = QueryResponseFut<Result<(), CapabilitiesError>>
type DictionaryInsertResponseFut = QueryResponseFut<Result<(), CapabilitiesError>>
type DictionaryGetResponseFut = QueryResponseFut<Result<CapabilityType, CapabilitiesError>>
type DictionaryRemoveResponseFut = QueryResponseFut<Result<CapabilityType, CapabilitiesError>>
type DictionaryIterateKeysResponseFut = QueryResponseFut<Result<(), CapabilitiesError>>
type DataGetResponseFut = QueryResponseFut<Result<Data, CapabilitiesError>>
type ConnectorRouterRouteResponseFut = QueryResponseFut<Result<(), i32>>
type DirConnectorRouterRouteResponseFut = QueryResponseFut<Result<(), i32>>
type DictionaryRouterRouteResponseFut = QueryResponseFut<Result<(), i32>>
type DataRouterRouteResponseFut = QueryResponseFut<Result<(), i32>>
fn connector_create( &self, connector: EventPair, receiver_client_end: ClientEnd<ReceiverMarker>, ) -> Self::ConnectorCreateResponseFut
fn dir_connector_create( &self, dir_connector: EventPair, receiver_client_end: ClientEnd<DirReceiverMarker>, ) -> Self::DirConnectorCreateResponseFut
fn dictionary_create( &self, dictionary: EventPair, ) -> Self::DictionaryCreateResponseFut
fn data_create( &self, data_handle: EventPair, data: &Data, ) -> Self::DataCreateResponseFut
fn connector_router_create( &self, router: EventPair, router_client_end: ClientEnd<ConnectorRouterMarker>, ) -> Self::ConnectorRouterCreateResponseFut
fn dir_connector_router_create( &self, router: EventPair, router_client_end: ClientEnd<DirConnectorRouterMarker>, ) -> Self::DirConnectorRouterCreateResponseFut
fn dictionary_router_create( &self, router: EventPair, router_client_end: ClientEnd<DictionaryRouterMarker>, ) -> Self::DictionaryRouterCreateResponseFut
fn data_router_create( &self, router: EventPair, router_client_end: ClientEnd<DataRouterMarker>, ) -> Self::DataRouterCreateResponseFut
fn connector_open( &self, connector: EventPair, channel: Channel, ) -> Self::ConnectorOpenResponseFut
fn dir_connector_open( &self, payload: CapabilitiesDirConnectorOpenRequest, ) -> Self::DirConnectorOpenResponseFut
fn dictionary_insert( &self, dictionary: EventPair, key: &str, value: EventPair, ) -> Self::DictionaryInsertResponseFut
fn dictionary_get( &self, dictionary: EventPair, key: &str, value: EventPair, ) -> Self::DictionaryGetResponseFut
fn dictionary_remove( &self, payload: CapabilitiesDictionaryRemoveRequest, ) -> Self::DictionaryRemoveResponseFut
fn dictionary_iterate_keys( &self, dictionary: EventPair, key_iterator: ServerEnd<DictionaryKeyIteratorMarker>, ) -> Self::DictionaryIterateKeysResponseFut
fn data_get(&self, data_handle: EventPair) -> Self::DataGetResponseFut
fn connector_router_route( &self, router: EventPair, request: RouteRequest, connector: EventPair, ) -> Self::ConnectorRouterRouteResponseFut
fn dir_connector_router_route( &self, router: EventPair, request: RouteRequest, dir_connector: EventPair, ) -> Self::DirConnectorRouterRouteResponseFut
fn dictionary_router_route( &self, router: EventPair, request: RouteRequest, dictionary: EventPair, ) -> Self::DictionaryRouterRouteResponseFut
fn data_router_route( &self, router: EventPair, request: RouteRequest, data_handle: i32, ) -> Self::DataRouterRouteResponseFut
Source§impl Clone for CapabilitiesProxy
impl Clone for CapabilitiesProxy
Source§fn clone(&self) -> CapabilitiesProxy
fn clone(&self) -> CapabilitiesProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CapabilitiesProxy
impl Debug for CapabilitiesProxy
Source§impl Proxy for CapabilitiesProxy
impl Proxy for CapabilitiesProxy
Source§type Protocol = CapabilitiesMarker
type Protocol = CapabilitiesMarker
Proxy controls.