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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
use crate::data::channel;
use crate::data::object::Object;
use crate::data::presence;
use crate::data::timetoken::Timetoken;
use crate::data::uuid::UUID;
use std::marker::PhantomData;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Publish {
pub channel: channel::Name,
pub payload: Object,
pub meta: Option<Object>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Subscribe {
pub channels: Vec<channel::Name>,
pub channel_groups: Vec<channel::Name>,
pub timetoken: Timetoken,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SetState {
pub channels: Vec<channel::Name>,
pub channel_groups: Vec<channel::Name>,
pub uuid: UUID,
pub state: Object,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct GetState {
pub channels: Vec<channel::Name>,
pub channel_groups: Vec<channel::Name>,
pub uuid: UUID,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct HereNow<TRespondWith>
where
TRespondWith: presence::respond_with::RespondWith,
{
pub channels: Vec<channel::Name>,
pub channel_groups: Vec<channel::Name>,
pub respond_with: PhantomData<TRespondWith>,
}
#[allow(missing_copy_implementations)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct GlobalHereNow<TRespondWith>
where
TRespondWith: presence::respond_with::RespondWith,
{
pub respond_with: PhantomData<TRespondWith>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct WhereNow {
pub uuid: UUID,
}