Gets the kind of setting.
(&self)
| 85 | impl Value { |
| 86 | /// Gets the kind of setting. |
| 87 | pub fn kind(&self) -> SettingKind { |
| 88 | match &self.detail { |
| 89 | detail::Detail::Enum { .. } => SettingKind::Enum, |
| 90 | detail::Detail::Num => SettingKind::Num, |
| 91 | detail::Detail::Bool { .. } => SettingKind::Bool, |
| 92 | detail::Detail::Preset => unreachable!(), |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | /// Gets the enum value if the value is from an enum setting. |
| 97 | pub fn as_enum(&self) -> Option<&'static str> { |
no outgoing calls
no test coverage detected