1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
/// When a user joins a channel
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Join {
    /// Name of the user that joined
    pub user: String,
    /// The channel that they joined
    pub channel: String,
}

impl Join {
    /// Name of the user that joined
    pub fn user(&self) -> &str {
        &self.user
    }
    /// The channel that they joined
    pub fn channel(&self) -> &str {
        &self.channel
    }
}