summaryrefslogtreecommitdiff
path: root/src/attributes/cluster_mode.rs
blob: 03e2bf9e52e4961efaffae7f05e32b9dadcce1c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::dot::DotString;
use std::borrow::Cow;

pub enum ClusterMode {
    Local,
    Global,
    None,
}

impl<'a> DotString<'a> for ClusterMode {
    fn dot_string(&self) -> Cow<'a, str> {
        match self {
            ClusterMode::Local => "local".into(),
            ClusterMode::Global => "global".into(),
            ClusterMode::None => "none".into(),
        }
    }
}