1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use Backend;
use Result;
/// The [`Frontend`] is responsible for processing incomming RPCs and for passing on outgoing RPCs to the [`Backend`].
/// The [`Frontend`] provides a way to make calls on the client side and a way to register procedures on the server side.
///
/// # Incomming RPCs
/// The [`Frontend`] is acting as server.
///
/// Incomming [`Call`](crate::Call)<[`Intermediate`](Backend::Intermediate)`>`s are received from the [`Backend`].
/// The calls are deserialized via [`Backend::deserialize`](crate::interfaces::Backend::deserialize) to the correct type.
/// The calls are processed and the replys serialized via [`Backend::serialize`](crate::interfaces::Backend::serialize) and passed on to the [`Backend`] as [`Reply`](crate::Reply)<[`Intermediate`](Backend::Intermediate)`>`.
///
/// # Outgoing RPCs
/// The [`Frontend`] is acting as client.
///
/// The [`Frontend`] serializes the calls via [`Backend::serialize`](crate::interfaces::Backend::serialize)
/// and passes them to the [`Backend`] as [`Call`](crate::Call)<[`Intermediate`](Backend::Intermediate)`>`.
/// The replies are received from the [`Backend`] deserialized via [`Backend::deserialize`](crate::interfaces::Backend::deserialize) passed on as response.
///
/// # Examples
/// For examples look at the provided [`Frontend`]s:
/// * [`Derive`](/merfolk_frontend_derive)
/// * [`Logger`](/merfolk_frontend_logger)
/// * [`Register`](/merfolk_frontend_register)