pub fn append_supersede<T>(
records: &mut Vec<BitemporalRecord<T>>,
new_record: BitemporalRecord<T>,
) -> Result<Vec<SupersessionReceipt>, BitemporalError>where
T: Clone,Expand description
Append a new record and mark prior versions as superseded.
This is the core append-supersede operation:
- A new row is inserted with the given
valid_timeand a newrecorded_time - Any prior rows for the same record ID are marked as superseded
Returns a SupersessionReceipt for each superseded prior record.
§Arguments
records— mutable slice of existing records (simulating a database table)new_record— the new record to append
§Returns
Vector of SupersessionReceipt for each superseded prior version.