torrust-actix 4.2.3

A rich, fast and efficient Bittorrent Tracker.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::config::enums::cluster_mode::ClusterMode;

impl ClusterMode {
    pub fn is_master(&self) -> bool {
        matches!(self, ClusterMode::master)
    }

    pub fn is_slave(&self) -> bool {
        matches!(self, ClusterMode::slave)
    }

    pub fn is_standalone(&self) -> bool {
        matches!(self, ClusterMode::standalone)
    }
}