Function snapps_txn_reference_impl::update_logic::set_or_keep [−][src]
pub fn set_or_keep<T>(original: T, update: SetOrKeep<T>) -> T
Expand description
Compute the new value, given the original value and a SetOrKeep
update.
If the update is Keep
, return the original value.
If the value is Set(new_value)
, return new_value
.