Expand description
This module is needed only if you want to perform some raw exchange (or export/import) of services.
You may have Skeleton, which is a service to be registered, but with its trait erased.
You can prepare one and hold it for a while, and register it on demand.
Creating an instance of Skeleton doesn’t involve any context.
That means you can have a service object that both its trait and its context (to be exported later) remains undecided.
You may also have HandleToExchange, which is a raw handle as a result of exporting a Skeleton.
It should be imported as a proxy object on the other side, but you can manage it freely until that moment.
It is useful when there is a third party besides two contexts of a single connection, who wants to perform service exchange by itself, not directly between contexts.
Raw exchange is not that frequently required. In most cases just using ordinary methods like ServiceToExport, ServiceToImport or ServiceRef would be enough.
Please check again that you surely need this module.
Structs§
- Handle
ToExchange - An identifier of the skeleton.
- Skeleton
- An opaque service to register in the context.
Traits§
- Import
Proxy - Conversion into a smart pointer of a service object, from
HandleToExchange. - Into
Skeleton - Conversion into a
Skeleton, from a smart pointer of a service object.
Functions§
- export_
service_ into_ handle - Exports a skeleton and returns a handle to it.
- import_
null_ proxy - Create a proxy object that always panic for all methods.
- import_
service_ from_ handle - Imports a handle into a proxy object.