pub enum CapabilitiesRequest {
Show 20 variants
ConnectorCreate {
connector: EventPair,
receiver_client_end: ClientEnd<ReceiverMarker>,
responder: CapabilitiesConnectorCreateResponder,
},
DirConnectorCreate {
dir_connector: EventPair,
receiver_client_end: ClientEnd<DirReceiverMarker>,
responder: CapabilitiesDirConnectorCreateResponder,
},
DictionaryCreate {
dictionary: EventPair,
responder: CapabilitiesDictionaryCreateResponder,
},
DataCreate {
data_handle: EventPair,
data: Data,
responder: CapabilitiesDataCreateResponder,
},
ConnectorRouterCreate {
router: EventPair,
router_client_end: ClientEnd<ConnectorRouterMarker>,
responder: CapabilitiesConnectorRouterCreateResponder,
},
DirConnectorRouterCreate {
router: EventPair,
router_client_end: ClientEnd<DirConnectorRouterMarker>,
responder: CapabilitiesDirConnectorRouterCreateResponder,
},
DictionaryRouterCreate {
router: EventPair,
router_client_end: ClientEnd<DictionaryRouterMarker>,
responder: CapabilitiesDictionaryRouterCreateResponder,
},
DataRouterCreate {
router: EventPair,
router_client_end: ClientEnd<DataRouterMarker>,
responder: CapabilitiesDataRouterCreateResponder,
},
ConnectorOpen {
connector: EventPair,
channel: Channel,
responder: CapabilitiesConnectorOpenResponder,
},
DirConnectorOpen {
payload: CapabilitiesDirConnectorOpenRequest,
responder: CapabilitiesDirConnectorOpenResponder,
},
DictionaryInsert {
dictionary: EventPair,
key: String,
value: EventPair,
responder: CapabilitiesDictionaryInsertResponder,
},
DictionaryGet {
dictionary: EventPair,
key: String,
value: EventPair,
responder: CapabilitiesDictionaryGetResponder,
},
DictionaryRemove {
payload: CapabilitiesDictionaryRemoveRequest,
responder: CapabilitiesDictionaryRemoveResponder,
},
DictionaryIterateKeys {
dictionary: EventPair,
key_iterator: ServerEnd<DictionaryKeyIteratorMarker>,
responder: CapabilitiesDictionaryIterateKeysResponder,
},
DataGet {
data_handle: EventPair,
responder: CapabilitiesDataGetResponder,
},
ConnectorRouterRoute {
router: EventPair,
request: RouteRequest,
connector: EventPair,
responder: CapabilitiesConnectorRouterRouteResponder,
},
DirConnectorRouterRoute {
router: EventPair,
request: RouteRequest,
dir_connector: EventPair,
responder: CapabilitiesDirConnectorRouterRouteResponder,
},
DictionaryRouterRoute {
router: EventPair,
request: RouteRequest,
dictionary: EventPair,
responder: CapabilitiesDictionaryRouterRouteResponder,
},
DataRouterRoute {
router: EventPair,
request: RouteRequest,
data_handle: i32,
responder: CapabilitiesDataRouterRouteResponder,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: CapabilitiesControlHandle,
method_type: MethodType,
},
}Expand description
An API for creating and manipulating references to runtime capabilities in the component framework. These capabilities are all reference counted by component manager, and when accessed with this protocol the references are implemented as event pair handles.
Variants§
ConnectorCreate
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.
Fields
receiver_client_end: ClientEnd<ReceiverMarker>responder: CapabilitiesConnectorCreateResponderDirConnectorCreate
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.
Fields
receiver_client_end: ClientEnd<DirReceiverMarker>responder: CapabilitiesDirConnectorCreateResponderDictionaryCreate
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.
DataCreate
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.
ConnectorRouterCreate
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.
Fields
router_client_end: ClientEnd<ConnectorRouterMarker>responder: CapabilitiesConnectorRouterCreateResponderDirConnectorRouterCreate
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.
Fields
router_client_end: ClientEnd<DirConnectorRouterMarker>DictionaryRouterCreate
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.
Fields
router_client_end: ClientEnd<DictionaryRouterMarker>responder: CapabilitiesDictionaryRouterCreateResponderDataRouterCreate
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.
Fields
router_client_end: ClientEnd<DataRouterMarker>responder: CapabilitiesDataRouterCreateResponderConnectorOpen
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.
DirConnectorOpen
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.
Fields
payload: CapabilitiesDirConnectorOpenRequestresponder: CapabilitiesDirConnectorOpenResponderDictionaryInsert
Inserts a new capability into this Dictionary under the name key.
Overwrites any existing entry.
Fields
responder: CapabilitiesDictionaryInsertResponderDictionaryGet
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.
Fields
responder: CapabilitiesDictionaryGetResponderDictionaryRemove
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.
Fields
payload: CapabilitiesDictionaryRemoveRequestresponder: CapabilitiesDictionaryRemoveResponderDictionaryIterateKeys
Opens an iterator which can be used to iterate over the keys of this dictionary.
Fields
key_iterator: ServerEnd<DictionaryKeyIteratorMarker>responder: CapabilitiesDictionaryIterateKeysResponderDataGet
Returns the Data value that was provided to the DataCreate call used with
data_handle.
ConnectorRouterRoute
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.
DirConnectorRouterRoute
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.
Fields
request: RouteRequestDictionaryRouterRoute
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.
DataRouterRoute
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.
#[non_exhaustive]_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: CapabilitiesControlHandlemethod_type: MethodTypeImplementations§
Source§impl CapabilitiesRequest
impl CapabilitiesRequest
pub fn into_connector_create( self, ) -> Option<(EventPair, ClientEnd<ReceiverMarker>, CapabilitiesConnectorCreateResponder)>
pub fn into_dir_connector_create( self, ) -> Option<(EventPair, ClientEnd<DirReceiverMarker>, CapabilitiesDirConnectorCreateResponder)>
pub fn into_dictionary_create( self, ) -> Option<(EventPair, CapabilitiesDictionaryCreateResponder)>
pub fn into_data_create( self, ) -> Option<(EventPair, Data, CapabilitiesDataCreateResponder)>
pub fn into_connector_router_create( self, ) -> Option<(EventPair, ClientEnd<ConnectorRouterMarker>, CapabilitiesConnectorRouterCreateResponder)>
pub fn into_dir_connector_router_create( self, ) -> Option<(EventPair, ClientEnd<DirConnectorRouterMarker>, CapabilitiesDirConnectorRouterCreateResponder)>
pub fn into_dictionary_router_create( self, ) -> Option<(EventPair, ClientEnd<DictionaryRouterMarker>, CapabilitiesDictionaryRouterCreateResponder)>
pub fn into_data_router_create( self, ) -> Option<(EventPair, ClientEnd<DataRouterMarker>, CapabilitiesDataRouterCreateResponder)>
pub fn into_connector_open( self, ) -> Option<(EventPair, Channel, CapabilitiesConnectorOpenResponder)>
pub fn into_dir_connector_open( self, ) -> Option<(CapabilitiesDirConnectorOpenRequest, CapabilitiesDirConnectorOpenResponder)>
pub fn into_dictionary_insert( self, ) -> Option<(EventPair, String, EventPair, CapabilitiesDictionaryInsertResponder)>
pub fn into_dictionary_get( self, ) -> Option<(EventPair, String, EventPair, CapabilitiesDictionaryGetResponder)>
pub fn into_dictionary_remove( self, ) -> Option<(CapabilitiesDictionaryRemoveRequest, CapabilitiesDictionaryRemoveResponder)>
pub fn into_dictionary_iterate_keys( self, ) -> Option<(EventPair, ServerEnd<DictionaryKeyIteratorMarker>, CapabilitiesDictionaryIterateKeysResponder)>
pub fn into_data_get(self) -> Option<(EventPair, CapabilitiesDataGetResponder)>
pub fn into_connector_router_route( self, ) -> Option<(EventPair, RouteRequest, EventPair, CapabilitiesConnectorRouterRouteResponder)>
pub fn into_dir_connector_router_route( self, ) -> Option<(EventPair, RouteRequest, EventPair, CapabilitiesDirConnectorRouterRouteResponder)>
pub fn into_dictionary_router_route( self, ) -> Option<(EventPair, RouteRequest, EventPair, CapabilitiesDictionaryRouterRouteResponder)>
pub fn into_data_router_route( self, ) -> Option<(EventPair, RouteRequest, i32, CapabilitiesDataRouterRouteResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL