Skip to main content

verified_bytes

Function verified_bytes 

Source
pub fn verified_bytes(
    content: &str,
    range: Range<usize>,
    guard: &str,
) -> Option<Range<usize>>
Expand description

The byte range of a marked passage, but only when its digest still matches guard.

This is the write-back guard: the agent may have started from a version the author has since edited, and a replacement must never land in text it was not written for.