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
31
use gtk::glib;

#[derive(
    PartialEq,
    Eq,
    Debug,
    Clone,
    Copy,
    strum::EnumString,
    strum::AsRefStr,
    num_derive::ToPrimitive,
    serde::Deserialize,
    serde::Serialize,
)]
#[strum(serialize_all = "snake_case")]
pub enum PluginName {
    Activities,
    Calories,
    Steps,
    Weight,
}

impl glib::ToValue for PluginName {
    fn to_value(&self) -> glib::Value {
        self.as_ref().to_value()
    }

    fn value_type(&self) -> glib::Type {
        <String as glib::StaticType>::static_type()
    }
}