twilight_model/guild/
prune.rs

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
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct GuildPrune {
    pub pruned: u64,
}

#[cfg(test)]
mod tests {
    use super::GuildPrune;
    use serde_test::Token;

    #[test]
    fn guild_prune() {
        let prune = GuildPrune { pruned: 31 };

        serde_test::assert_tokens(
            &prune,
            &[
                Token::Struct {
                    name: "GuildPrune",
                    len: 1,
                },
                Token::Str("pruned"),
                Token::U64(31),
                Token::StructEnd,
            ],
        );
    }
}