Reset the value from [ActiveValue::Unchanged] to [ActiveValue::Set], leaving [ActiveValue::NotSet] untouched.
(&mut self)
| 857 | /// Reset the value from [ActiveValue::Unchanged] to [ActiveValue::Set], |
| 858 | /// leaving [ActiveValue::NotSet] untouched. |
| 859 | pub fn reset(&mut self) { |
| 860 | *self = match self.take() { |
| 861 | Some(value) => ActiveValue::Set(value), |
| 862 | None => ActiveValue::NotSet, |
| 863 | }; |
| 864 | } |
| 865 | |
| 866 | /// `Set(value)`, except when [`self.is_unchanged()`][ActiveValue#method.is_unchanged] |
| 867 | /// and `value` equals the current [Unchanged][ActiveValue::Unchanged] value. |