fn resolve_anchor(
file: &mut File,
session_id: &str,
len: u64,
anchor: &TranscriptAnchor,
step: u64,
cap: u64,
) -> Option<u64>Expand description
Where a read’s window ends for a named anchor: the byte its row starts at, seeking when the cursor carries a byte and searching from the file’s end when it does not.
None when the anchor cannot be placed - a row the file does not carry, or
one further from the end than SPAN_CAP_BYTES reaches - which the caller
answers as the end of the history.