remoc 0.18.3

🦑 Remote multiplexed objects, channels, observable collections and RPC making remote interactions seamless. Provides multiple remote channels and RPC over TCP, TLS or any other transport.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Messages exchanged between remote functions and their providers.

use serde::{Deserialize, Serialize};

use crate::{RemoteSend, codec, rch::oneshot};

/// Remote function call request.
#[derive(Serialize, Deserialize)]
#[serde(bound(serialize = "A: RemoteSend, R: RemoteSend, Codec: codec::Codec"))]
#[serde(bound(deserialize = "A: RemoteSend, R: RemoteSend, Codec: codec::Codec"))]
pub struct RFnRequest<A, R, Codec> {
    /// Function argument.
    pub argument: A,
    /// Channel for result transmission.
    pub result_tx: oneshot::Sender<R, Codec>,
}