1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use derive_more::Display;

use crate::newtype;

newtype!(
    Generation,
    u32,
    Display,
    Default,
    Copy,
    r#"A counter for the server generation.

This counter is increased by one each time the server restarts itself when the configuration file is updated."#
);
impl Generation {
    pub fn inc(&mut self) {
        self.0 += 1;
    }
}