Module ipc_channel::router
source · [−]Expand description
Routers allow converting IPC channels to crossbeam channels.
The RouterProxy provides various methods to register IpcReceiver<T>s.
The router will then either call the appropriate callback
or route the message to a crossbeam Sender<T> or Receiver<T>.
You should use the global ROUTER to access the RouterProxy methods (via ROUTER’s
Deref for RouterProxy.
Structs
Global object wrapping a RouterProxy.
Add routes (add_route), or convert IpcReceiver
A RouterProxy provides methods for talking to the router. Calling
new automatically spins up a router thread which
waits for events on its registered IpcReceiver<T>s. The RouterProxy’s
methods communicate with the running router thread to register new
IpcReceiver<T>’s
Type Definitions
Function to call when a new event is received from the corresponding receiver.