pub fn resolve_version(
raw: &str,
versions: &[PageVersion],
relative_to: u32,
) -> Result<u32>Expand description
Resolves a user-supplied version reference against a list of
PageVersion records returned by ConfluenceApi::list_page_versions.
Accepts:
"latest"— the newest known version (versions[0].number)."previous"— the version immediately beforerelative_to."v-N"(e.g."v-2") — the versionrelative_to - N.- Numeric (
"5") — that exact version; must be present inversions. - ISO 8601 date — the most recent version whose
created_at <=the given date. Detected when the input contains-orT.
relative_to anchors "previous" and "v-N". Pass the resolved to
version when resolving from, so previous always means “one before
to” regardless of what to itself is.
versions must be ordered newest-first (the natural shape returned by
list_page_versions).