Skip to main content

compose_context

Function compose_context 

Source
pub fn compose_context<'a, I>(frames: I) -> String
where I: IntoIterator<Item = (&'a str, &'a ContextFrame)>,
Expand description

Render a set of (provider id, frame) pairs into a byte-stable context block (docs/context-reuse.md §1).

The output is deterministic: it depends only on the set of frames and their content, never on iteration order, and re-rendering the same set yields identical bytes. Passing the same set with fluctuating scores yields the same bytes too — relevance is not part of a frame’s rendered identity.