pub enum WriteOutcome {
Added,
Superseded,
Unchanged,
Updated,
}Expand description
Outcome of a 12.1 write operation (remember with key, or update).
Plain remember without a key always returns a ULID, not a
WriteOutcome, because supersession and NOOP detection are tied to
the key slot.
Variants§
Added
Keyed write with no prior record for this slot. A brand-new record was inserted, no record was superseded.
Superseded
Keyed write whose content / type / importance / user metadata
differs from the live record for this slot. A new record was
inserted and the prior one was marked
_mnemo.superseded_by / _mnemo.invalid_at.
Unchanged
No-op: the incoming keyed write is byte-equal to the live record for this slot (content, memory type, importance, user metadata). No record was written and no catalog page was dirtied. The returned id is the existing record’s id.
Updated
In-place update: fields changed on the target record. The record
was rewritten copy-on-write so the previous version remains
visible through snapshots.