Module raw_exchange

Module raw_exchange 

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

HandleToExchange
An identifier of the skeleton.
Skeleton
An opaque service to register in the context.

Traits§

ImportProxy
Conversion into a smart pointer of a service object, from HandleToExchange.
IntoSkeleton
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.