MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / reset

Method reset

src/entity/active_model.rs:859–864  ·  view source on GitHub ↗

Reset the value from [ActiveValue::Unchanged] to [ActiveValue::Set], leaving [ActiveValue::NotSet] untouched.

(&mut self)

Source from the content-addressed store, hash-verified

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.

Callers 1

reset_allMethod · 0.45

Calls 1

takeMethod · 0.80

Tested by

no test coverage detected