Gets the enum value if the value is from an enum setting.
(&self)
| 95 | |
| 96 | /// Gets the enum value if the value is from an enum setting. |
| 97 | pub fn as_enum(&self) -> Option<&'static str> { |
| 98 | self.values.map(|v| v[self.value as usize]) |
| 99 | } |
| 100 | |
| 101 | /// Gets the numerical value if the value is from a num setting. |
| 102 | pub fn as_num(&self) -> Option<u8> { |
no test coverage detected