Gets the numerical value if the value is from a num setting.
(&self)
| 100 | |
| 101 | /// Gets the numerical value if the value is from a num setting. |
| 102 | pub fn as_num(&self) -> Option<u8> { |
| 103 | match &self.detail { |
| 104 | detail::Detail::Num => Some(self.value), |
| 105 | _ => None, |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | /// Gets the boolean value if the value is from a boolean setting. |
| 110 | pub fn as_bool(&self) -> Option<bool> { |
no outgoing calls
no test coverage detected