CapabilitiesRequest

Enum CapabilitiesRequest 

Source
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

§connector: EventPair
§receiver_client_end: ClientEnd<ReceiverMarker>
§

DirConnectorCreate

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

§dir_connector: EventPair
§receiver_client_end: ClientEnd<DirReceiverMarker>
§

DictionaryCreate

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.

Fields

§data_handle: EventPair
§data: Data
§

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.

§

DirConnectorRouterCreate

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.

§

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.

§

DataRouterCreate

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.

§

ConnectorOpen

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.

§

DictionaryInsert

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

§

DictionaryGet

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.

§

DictionaryRemove

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.

§

DictionaryIterateKeys

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

§

DataGet

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

Fields

§data_handle: EventPair
§

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

DictionaryRouterRoute

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

DataRouterRoute

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.

Fields

§router: EventPair
§data_handle: i32
§

#[non_exhaustive]
_UnknownMethod

An interaction was received which does not match any known method.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§ordinal: u64

Ordinal of the method that was called.

§method_type: MethodType

Implementations§

Source§

impl CapabilitiesRequest

Source

pub fn into_connector_create( self, ) -> Option<(EventPair, ClientEnd<ReceiverMarker>, CapabilitiesConnectorCreateResponder)>

Source

pub fn into_dir_connector_create( self, ) -> Option<(EventPair, ClientEnd<DirReceiverMarker>, CapabilitiesDirConnectorCreateResponder)>

Source

pub fn into_dictionary_create( self, ) -> Option<(EventPair, CapabilitiesDictionaryCreateResponder)>

Source

pub fn into_data_create( self, ) -> Option<(EventPair, Data, CapabilitiesDataCreateResponder)>

Source

pub fn into_connector_router_create( self, ) -> Option<(EventPair, ClientEnd<ConnectorRouterMarker>, CapabilitiesConnectorRouterCreateResponder)>

Source

pub fn into_dir_connector_router_create( self, ) -> Option<(EventPair, ClientEnd<DirConnectorRouterMarker>, CapabilitiesDirConnectorRouterCreateResponder)>

Source

pub fn into_dictionary_router_create( self, ) -> Option<(EventPair, ClientEnd<DictionaryRouterMarker>, CapabilitiesDictionaryRouterCreateResponder)>

Source

pub fn into_data_router_create( self, ) -> Option<(EventPair, ClientEnd<DataRouterMarker>, CapabilitiesDataRouterCreateResponder)>

Source

pub fn into_connector_open( self, ) -> Option<(EventPair, Channel, CapabilitiesConnectorOpenResponder)>

Source

pub fn into_dir_connector_open( self, ) -> Option<(CapabilitiesDirConnectorOpenRequest, CapabilitiesDirConnectorOpenResponder)>

Source

pub fn into_dictionary_insert( self, ) -> Option<(EventPair, String, EventPair, CapabilitiesDictionaryInsertResponder)>

Source

pub fn into_dictionary_get( self, ) -> Option<(EventPair, String, EventPair, CapabilitiesDictionaryGetResponder)>

Source

pub fn into_dictionary_remove( self, ) -> Option<(CapabilitiesDictionaryRemoveRequest, CapabilitiesDictionaryRemoveResponder)>

Source

pub fn into_dictionary_iterate_keys( self, ) -> Option<(EventPair, ServerEnd<DictionaryKeyIteratorMarker>, CapabilitiesDictionaryIterateKeysResponder)>

Source

pub fn into_data_get(self) -> Option<(EventPair, CapabilitiesDataGetResponder)>

Source

pub fn into_connector_router_route( self, ) -> Option<(EventPair, RouteRequest, EventPair, CapabilitiesConnectorRouterRouteResponder)>

Source

pub fn into_dir_connector_router_route( self, ) -> Option<(EventPair, RouteRequest, EventPair, CapabilitiesDirConnectorRouterRouteResponder)>

Source

pub fn into_dictionary_router_route( self, ) -> Option<(EventPair, RouteRequest, EventPair, CapabilitiesDictionaryRouterRouteResponder)>

Source

pub fn into_data_router_route( self, ) -> Option<(EventPair, RouteRequest, i32, CapabilitiesDataRouterRouteResponder)>

Source

pub fn method_name(&self) -> &'static str

Name of the method defined in FIDL

Trait Implementations§

Source§

impl Debug for CapabilitiesRequest

Source§

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

Formats the value using the given formatter. 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.