[][src]Crate remote_trait_object

Modules

macro_env
transport

Structs

Config
Context
Handle

Remote service will carry this.

HandleToExchange

This represents transportable identifier of the service object and should be enough to construct a handle along with the pointer to the port which this service belong to

Packet
PacketView
ServiceRef
SlotId

Traits

Dispatch

Exporter sides's interface to the service object. This will be implemented by each service trait's unique wrapper in the macro

NullService

NullServive is the only actual service trait that remote-trait-object provides by default. It will be useful when you want to establish a remote-trait-object connection with with_initial_service(), but such initial service is needed by only one side.

Port
Service

All service trait must implement this. This trait serves as a mere marker trait with two bounds

ToDispatcher

Unused T is for avoiding violation of the orphan rule T will be local type for the crate, and that makes it possible to

ToRemote

Unused T is for avoiding violation of the orphan rule, like ToDispatcher

Functions

create_null_service
export_service
import_service
setup_identifiers

This is supposed to be called only once during the entire lifetime of the process. However it is ok to call multiple times if the IdMap is identical, especially in the tests where each test share that static id list

Type Definitions

MethodId

Attribute Macros

service

It generates all necessary helper structs that makes the trait be able to be used as a service. There will be many new public structs, but you don't have to know about them.

service_debug

This macro consumes the target trait, and will print the expanded code. Use this when you want to see the result of macro.