sirius_bindings/parameters/
zodiac.rs1use crate::traits::{Enablable, IntoDefault, NamedParametersSet};
2
3#[derive(Debug, Clone, Copy, PartialEq)]
5pub enum ZodiacV5 {
6 Enabled,
8
9 Version,
11
12 Help,
14}
15
16impl ToString for ZodiacV5 {
17 fn to_string(&self) -> String {
18 match self {
19 ZodiacV5::Enabled => Self::parameter_set_name().to_string(),
20 ZodiacV5::Help => "--help".to_string(),
21 ZodiacV5::Version => "--version".to_string(),
22 }
23 }
24}
25
26impl IntoDefault for ZodiacV5 {
27 fn into_default(self) -> Self {
28 match self {
29 ZodiacV5::Enabled => ZodiacV5::Enabled,
30 ZodiacV5::Help => ZodiacV5::Help,
31 ZodiacV5::Version => ZodiacV5::Version,
32 }
33 }
34}
35
36impl Enablable for ZodiacV5 {
37 fn is_enabler(&self) -> bool {
38 matches!(self, ZodiacV5::Enabled)
39 }
40
41 fn enabler() -> Self {
42 ZodiacV5::Enabled
43 }
44}
45
46impl NamedParametersSet for ZodiacV5 {
47 fn parameter_set_name() -> &'static str {
48 "zodiac"
49 }
50}