pub trait CapabilityStoreLocalServerHandler<___T: Transport = Channel> {
Show 20 methods
// Required methods
fn duplicate(
&mut self,
request: Request<Duplicate, ___T>,
responder: Responder<Duplicate, ___T>,
) -> impl Future<Output = ()>;
fn drop(
&mut self,
request: Request<Drop, ___T>,
responder: Responder<Drop, ___T>,
) -> impl Future<Output = ()>;
fn export(
&mut self,
request: Request<Export, ___T>,
responder: Responder<Export, ___T>,
) -> impl Future<Output = ()>;
fn import(
&mut self,
request: Request<Import, ___T>,
responder: Responder<Import, ___T>,
) -> impl Future<Output = ()>;
fn connector_create(
&mut self,
request: Request<ConnectorCreate, ___T>,
responder: Responder<ConnectorCreate, ___T>,
) -> impl Future<Output = ()>;
fn connector_open(
&mut self,
request: Request<ConnectorOpen, ___T>,
responder: Responder<ConnectorOpen, ___T>,
) -> impl Future<Output = ()>;
fn dir_connector_create(
&mut self,
request: Request<DirConnectorCreate, ___T>,
responder: Responder<DirConnectorCreate, ___T>,
) -> impl Future<Output = ()>;
fn dir_connector_open(
&mut self,
request: Request<DirConnectorOpen, ___T>,
responder: Responder<DirConnectorOpen, ___T>,
) -> impl Future<Output = ()>;
fn dictionary_create(
&mut self,
request: Request<DictionaryCreate, ___T>,
responder: Responder<DictionaryCreate, ___T>,
) -> impl Future<Output = ()>;
fn dictionary_legacy_import(
&mut self,
request: Request<DictionaryLegacyImport, ___T>,
responder: Responder<DictionaryLegacyImport, ___T>,
) -> impl Future<Output = ()>;
fn dictionary_legacy_export(
&mut self,
request: Request<DictionaryLegacyExport, ___T>,
responder: Responder<DictionaryLegacyExport, ___T>,
) -> impl Future<Output = ()>;
fn dictionary_insert(
&mut self,
request: Request<DictionaryInsert, ___T>,
responder: Responder<DictionaryInsert, ___T>,
) -> impl Future<Output = ()>;
fn dictionary_get(
&mut self,
request: Request<DictionaryGet, ___T>,
responder: Responder<DictionaryGet, ___T>,
) -> impl Future<Output = ()>;
fn dictionary_remove(
&mut self,
request: Request<DictionaryRemove, ___T>,
responder: Responder<DictionaryRemove, ___T>,
) -> impl Future<Output = ()>;
fn dictionary_copy(
&mut self,
request: Request<DictionaryCopy, ___T>,
responder: Responder<DictionaryCopy, ___T>,
) -> impl Future<Output = ()>;
fn dictionary_keys(
&mut self,
request: Request<DictionaryKeys, ___T>,
responder: Responder<DictionaryKeys, ___T>,
) -> impl Future<Output = ()>;
fn dictionary_enumerate(
&mut self,
request: Request<DictionaryEnumerate, ___T>,
responder: Responder<DictionaryEnumerate, ___T>,
) -> impl Future<Output = ()>;
fn dictionary_drain(
&mut self,
request: Request<DictionaryDrain, ___T>,
responder: Responder<DictionaryDrain, ___T>,
) -> impl Future<Output = ()>;
fn create_service_aggregate(
&mut self,
request: Request<CreateServiceAggregate, ___T>,
responder: Responder<CreateServiceAggregate, ___T>,
) -> impl Future<Output = ()>;
// Provided method
fn on_unknown_interaction(
&mut self,
ordinal: u64,
) -> impl Future<Output = ()> { ... }
}Expand description
A server handler for the CapabilityStore protocol.
See CapabilityStore for more details.
Required Methods§
Sourcefn duplicate(
&mut self,
request: Request<Duplicate, ___T>,
responder: Responder<Duplicate, ___T>,
) -> impl Future<Output = ()>
fn duplicate( &mut self, request: Request<Duplicate, ___T>, responder: Responder<Duplicate, ___T>, ) -> impl Future<Output = ()>
Duplicates the capability with id to dest_id.
Errors:
ID_NOT_FOUNDifidwas not a valid capability id in this store.ID_ALREADY_EXISTSif a capability withdest_idalready exists in this store.NOT_DUPLICATABLEifidcould not be duplicated.
Sourcefn drop(
&mut self,
request: Request<Drop, ___T>,
responder: Responder<Drop, ___T>,
) -> impl Future<Output = ()>
fn drop( &mut self, request: Request<Drop, ___T>, responder: Responder<Drop, ___T>, ) -> impl Future<Output = ()>
Drops the capability with id from this CapabilityStore.
Errors:
ID_NOT_FOUNDifidwas not a valid capability id in this store.
Sourcefn export(
&mut self,
request: Request<Export, ___T>,
responder: Responder<Export, ___T>,
) -> impl Future<Output = ()>
fn export( &mut self, request: Request<Export, ___T>, responder: Responder<Export, ___T>, ) -> impl Future<Output = ()>
Exports the capability with the client-assigned identifier id to
capability. This operation removes the capability from the store. If
this is not desired, [Duplicate] the capability first.
Errors:
ID_NOT_FOUNDifidwas not a valid capability id in this store.
Sourcefn import(
&mut self,
request: Request<Import, ___T>,
responder: Responder<Import, ___T>,
) -> impl Future<Output = ()>
fn import( &mut self, request: Request<Import, ___T>, responder: Responder<Import, ___T>, ) -> impl Future<Output = ()>
Imports capability into this store with the client-assigned id.
Errors:
ID_ALREADY_EXISTSif a capability withidalready exists in this store.BAD_CAPABILITYifcapabilitywas not a valid Capability.
Sourcefn connector_create(
&mut self,
request: Request<ConnectorCreate, ___T>,
responder: Responder<ConnectorCreate, ___T>,
) -> impl Future<Output = ()>
fn connector_create( &mut self, request: Request<ConnectorCreate, ___T>, responder: Responder<ConnectorCreate, ___T>, ) -> impl Future<Output = ()>
Sourcefn connector_open(
&mut self,
request: Request<ConnectorOpen, ___T>,
responder: Responder<ConnectorOpen, ___T>,
) -> impl Future<Output = ()>
fn connector_open( &mut self, request: Request<ConnectorOpen, ___T>, responder: Responder<ConnectorOpen, ___T>, ) -> impl Future<Output = ()>
Open a connection from the provided Connector capability that will be dispatched to the Receiver on the other end.
If there is an error, it will be reported as a zx.Status epitaph on server_end.
Errors:
ID_NOT_FOUNDifidwas not a valid capability id in this store.WRONG_TYPEifidwas not a connector capability.
Sourcefn dir_connector_create(
&mut self,
request: Request<DirConnectorCreate, ___T>,
responder: Responder<DirConnectorCreate, ___T>,
) -> impl Future<Output = ()>
fn dir_connector_create( &mut self, request: Request<DirConnectorCreate, ___T>, responder: Responder<DirConnectorCreate, ___T>, ) -> impl Future<Output = ()>
Creates a DirConnector from a DirReceiver. Incoming connections to the DirConnector will be dispatched to this DirReceiver.
Errors:
ID_ALREADY_EXISTSif a capability withidalready exists in this store.
Sourcefn dir_connector_open(
&mut self,
request: Request<DirConnectorOpen, ___T>,
responder: Responder<DirConnectorOpen, ___T>,
) -> impl Future<Output = ()>
fn dir_connector_open( &mut self, request: Request<DirConnectorOpen, ___T>, responder: Responder<DirConnectorOpen, ___T>, ) -> impl Future<Output = ()>
Open a connection from the provided DirConnector capability that will
be dispatched to the DirReceiver on the other end. The id and
server_end arguments are required, and the flags and path
arguments are optional (a path of . will be used if one is not
otherwise set).
If there was an error making the connection, it will be reported as a zx.Status
epitaph on server_end.
Errors:
ID_NOT_FOUNDifidwas not a valid capability id in this store.WRONG_TYPEifidwas not a connector capability.
Sourcefn dictionary_create(
&mut self,
request: Request<DictionaryCreate, ___T>,
responder: Responder<DictionaryCreate, ___T>,
) -> impl Future<Output = ()>
fn dictionary_create( &mut self, request: Request<DictionaryCreate, ___T>, responder: Responder<DictionaryCreate, ___T>, ) -> impl Future<Output = ()>
Creates a new empty dictionary in this CapabilityStore with client-assigned id.
Errors:
ID_ALREADY_EXISTSif a capability withidalready exists in this store.
Sourcefn dictionary_legacy_import(
&mut self,
request: Request<DictionaryLegacyImport, ___T>,
responder: Responder<DictionaryLegacyImport, ___T>,
) -> impl Future<Output = ()>
fn dictionary_legacy_import( &mut self, request: Request<DictionaryLegacyImport, ___T>, responder: Responder<DictionaryLegacyImport, ___T>, ) -> impl Future<Output = ()>
Imports a dictionary in the form of a channel.
This is a legacy API to support backward compatibility with APIs that take a Dictionary channel.
Errors:
ID_ALREADY_EXISTSif a capability withidalready exists in this store.BAD_CAPABILITYifclient_endwas not a valid dictionary channel.
Sourcefn dictionary_legacy_export(
&mut self,
request: Request<DictionaryLegacyExport, ___T>,
responder: Responder<DictionaryLegacyExport, ___T>,
) -> impl Future<Output = ()>
fn dictionary_legacy_export( &mut self, request: Request<DictionaryLegacyExport, ___T>, responder: Responder<DictionaryLegacyExport, ___T>, ) -> impl Future<Output = ()>
Binds a channel to the dictionary with id. The channel can
be re-imported into a CapabilityStore with [DictionaryImportLegacy].
This is a legacy API to support backward compatibility with APIs that take a Dictionary channel.
Errors:
ID_NOT_FOUNDifidwas not a valid capability id in this store.
Sourcefn dictionary_insert(
&mut self,
request: Request<DictionaryInsert, ___T>,
responder: Responder<DictionaryInsert, ___T>,
) -> impl Future<Output = ()>
fn dictionary_insert( &mut self, request: Request<DictionaryInsert, ___T>, responder: Responder<DictionaryInsert, ___T>, ) -> impl Future<Output = ()>
Inserts item into the dictionary with id. item.value is moved into the dictionary and
its id is released if this call succeeds.
Errors:
ID_NOT_FOUNDifidwas not a valid capability id in this store.WRONG_TYPEifidwas not a dictionary.INVALID_KEYifitem.keywas invalid.ITEM_ALREADY_EXISTSif the dictionary already contains an item withitem.key.
Sourcefn dictionary_get(
&mut self,
request: Request<DictionaryGet, ___T>,
responder: Responder<DictionaryGet, ___T>,
) -> impl Future<Output = ()>
fn dictionary_get( &mut self, request: Request<DictionaryGet, ___T>, responder: Responder<DictionaryGet, ___T>, ) -> impl Future<Output = ()>
Get a duplicate of a capability from the dictionary with id, which is
loaded into dest_id.
Errors:
ID_NOT_FOUNDifidwas not a recognized capability id in this store.ID_ALREADY_EXISTSif a capability withdest_idalready exists in this store.WRONG_TYPEifidwas not a dictionary.INVALID_KEYifitem.keywas invalid.ITEM_NOT_FOUNDif the dictionary does not containkey.NOT_DUPLICATABLEif the capability could not be duplicated.
Sourcefn dictionary_remove(
&mut self,
request: Request<DictionaryRemove, ___T>,
responder: Responder<DictionaryRemove, ___T>,
) -> impl Future<Output = ()>
fn dictionary_remove( &mut self, request: Request<DictionaryRemove, ___T>, responder: Responder<DictionaryRemove, ___T>, ) -> impl Future<Output = ()>
Removes a key from the dictionary with id. If dest_id is present, loads the value
into it, otherwise discards the value.
Errors:
ID_NOT_FOUNDifidwas not a valid capability id in this store.ID_ALREADY_EXISTSif a capability withdest_idalready exists in this store.WRONG_TYPEifidwas not a dictionary.INVALID_KEYifkeywas invalid.ITEM_NOT_FOUNDif the dictionary does not contain the key.
Sourcefn dictionary_copy(
&mut self,
request: Request<DictionaryCopy, ___T>,
responder: Responder<DictionaryCopy, ___T>,
) -> impl Future<Output = ()>
fn dictionary_copy( &mut self, request: Request<DictionaryCopy, ___T>, responder: Responder<DictionaryCopy, ___T>, ) -> impl Future<Output = ()>
Create a new dictionary that contains a duplicate of all the entries in
the dictionary with id, assigning dest_id to the new dictionary.
The runtime of this method is linear in the number of top-level entries
in the dictionary.
For example, if the dictionary contains nested dictionaries, the newly created dictionary will contain references to those same nested dictionaries because the entries are duplicated rather than deep-copied.
Errors:
ID_NOT_FOUNDifidwas not a valid capability id in this store.ID_ALREADY_EXISTSif a capability withdest_idalready exists in this store.WRONG_TYPEifidwas not a dictionary.NOT_DUPLICATABLEif one of the capabilities inidcould not be duplicated.
Sourcefn dictionary_keys(
&mut self,
request: Request<DictionaryKeys, ___T>,
responder: Responder<DictionaryKeys, ___T>,
) -> impl Future<Output = ()>
fn dictionary_keys( &mut self, request: Request<DictionaryKeys, ___T>, responder: Responder<DictionaryKeys, ___T>, ) -> impl Future<Output = ()>
Enumerates the keys in the dictionary with id.
Errors:
ID_NOT_FOUNDifidwas not a valid capability id in this store.WRONG_TYPEifidwas not a dictionary.
Sourcefn dictionary_enumerate(
&mut self,
request: Request<DictionaryEnumerate, ___T>,
responder: Responder<DictionaryEnumerate, ___T>,
) -> impl Future<Output = ()>
fn dictionary_enumerate( &mut self, request: Request<DictionaryEnumerate, ___T>, responder: Responder<DictionaryEnumerate, ___T>, ) -> impl Future<Output = ()>
Enumerates the items (keys and values) in the dictionary with id.
Creates a duplicate of each value (capability). If a value could not be duplicated, the value will be null.
Errors:
ID_NOT_FOUNDifidwas not a valid capability id in this store.WRONG_TYPEifidwas not a dictionary.
Sourcefn dictionary_drain(
&mut self,
request: Request<DictionaryDrain, ___T>,
responder: Responder<DictionaryDrain, ___T>,
) -> impl Future<Output = ()>
fn dictionary_drain( &mut self, request: Request<DictionaryDrain, ___T>, responder: Responder<DictionaryDrain, ___T>, ) -> impl Future<Output = ()>
Removes all the entries in this dictionary, returning them in contents if provided.
If contents is not provided, all the items are discarded without enumerating them.
Errors:
ID_NOT_FOUNDifidwas not a valid capability id in this store.WRONG_TYPEifidwas not a dictionary.
Sourcefn create_service_aggregate(
&mut self,
request: Request<CreateServiceAggregate, ___T>,
responder: Responder<CreateServiceAggregate, ___T>,
) -> impl Future<Output = ()>
fn create_service_aggregate( &mut self, request: Request<CreateServiceAggregate, ___T>, responder: Responder<CreateServiceAggregate, ___T>, ) -> impl Future<Output = ()>
Creates a new DirConnector that forwards open requests to a set of sources.
Provided Methods§
fn on_unknown_interaction(&mut self, ordinal: u64) -> impl Future<Output = ()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.