Function communication

Source
pub fn communication<Request, Response>(
    channels: usize,
) -> Result<Communication<Request, Response>, Error>
where for<'de> Request: Deserialize<'de> + Serialize, for<'de> Response: Deserialize<'de> + Serialize,
Expand description

Sets up communication channels for a given request-response pairs.

Client is clonable and can be sent across multiple threads or even processes.

Processors, on the other hand, are not clonable and can not be accessed from multiple threads simultaneously, but still can be sent across threads and processes.