1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
mod component_id;
mod executor_id;
mod timestamp;

pub use component_id::ComponentId;
pub use executor_id::ExecutorId;
pub use timestamp::Timestamp;

pub trait MsgMeta {
    fn ts(&self) -> Timestamp;

    fn cmp_source(&self) -> Option<ComponentId>;

    fn cmp_process(&self) -> Option<ComponentId>;

    fn cmp_set(&mut self, cmp_id: &ComponentId);

    /// Возвращает поле `value` в заданном формате
    fn fmt_value(&self, template: &str) -> String;
}