Gets the boolean value if the value is from a boolean setting.
(&self)
| 108 | |
| 109 | /// Gets the boolean value if the value is from a boolean setting. |
| 110 | pub fn as_bool(&self) -> Option<bool> { |
| 111 | match &self.detail { |
| 112 | detail::Detail::Bool { bit } => Some(self.value & (1 << bit) != 0), |
| 113 | _ => None, |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | /// Builds a string from the current value |
| 118 | pub fn value_string(&self) -> String { |
no outgoing calls