timely_communication/
logging.rs1#[derive(Abomonation, Debug, PartialEq, Eq, Hash, Clone, Copy)]
5pub struct CommunicationSetup {
6 pub sender: bool,
8 pub process: usize,
10 pub remote: Option<usize>,
12}
13
14#[derive(Abomonation, Debug, PartialEq, Eq, Hash, Clone, Copy)]
16pub enum CommunicationEvent {
17 Message(MessageEvent),
19 State(StateEvent),
21}
22
23#[derive(Abomonation, Debug, PartialEq, Eq, Hash, Clone, Copy)]
25pub struct MessageEvent {
26 pub is_send: bool,
28 pub header: crate::networking::MessageHeader,
30}
31
32#[derive(Abomonation, Debug, PartialEq, Eq, Hash, Clone, Copy)]
34pub struct StateEvent {
35 pub send: bool,
37 pub process: usize,
39 pub remote: usize,
41 pub start: bool,
43}
44
45impl From<MessageEvent> for CommunicationEvent {
46 fn from(v: MessageEvent) -> CommunicationEvent { CommunicationEvent::Message(v) }
47}
48impl From<StateEvent> for CommunicationEvent {
49 fn from(v: StateEvent) -> CommunicationEvent { CommunicationEvent::State(v) }
50}