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
pub use self::message::*;
pub(crate) mod message;
pub(crate) mod specs {
use serde::Serialize;
use std::{collections::HashSet, fmt::Display};
pub trait Symbolic: Clone + Display {
fn symbols(&self) -> &HashSet<Self>;
}
pub trait MessageSpec: Clone + Display + Serialize {
type Symbol: Symbolic;
fn message(&self) -> &Self::Symbol;
fn timestamp(&self) -> i64;
}
pub trait MessageSpecExt: MessageSpec {
type Metadata: Serialize;
fn metadata(&self) -> &Self::Metadata;
}
}