Sets the default value for the variable.
(&mut self, input: VarInput)
| 291 | |
| 292 | /// Sets the default value for the variable. |
| 293 | pub fn set_default(&mut self, input: VarInput) -> Result<(), VarError> { |
| 294 | let v = self.definition.parse(input)?; |
| 295 | self.validate_constraints(v.as_ref())?; |
| 296 | self.default_value = Some(v); |
| 297 | Ok(()) |
| 298 | } |
| 299 | |
| 300 | /// Reset the stored value to the default. |
| 301 | pub fn reset(&mut self, local: bool) { |