pub fn record_version(
fs: &impl Fs,
paths: &StorePaths,
clock: &impl Clock,
doc_id: &str,
content: &[u8],
meta: VersionMeta<'_>,
) -> Result<VersionOutcome, SessionError>Expand description
Record content as a new durable version. meta.label names it (a named
version is retained forever by the retention pass). meta.op_kind is an
optional category label. UNNAMED (auto) versions deduplicate against the
LATEST version: if content is byte-identical to it, the call returns
Unchanged and appends nothing. A NAMED version (meta.label.is_some()) is
an explicit checkpoint and is ALWAYS recorded, even when its content matches
the latest version.