Skip to main content

render_diagnostics_plain

Function render_diagnostics_plain 

Source
pub fn render_diagnostics_plain<'a>(
    pairs: impl IntoIterator<Item = (&'a str, &'a str)>,
) -> String
Expand description

Join (kind, message) pairs into the plain kind: message | … sentence.

The legacy, un-rendered form, for callers that embed the result inside another value and let a boundary render it later: a batch item stores its refusal as a plain message and the CLI/MCP render the item outcome, not each fragment. Every pair is kept, a message already leading with its kind is not prefixed twice, and duplicates collapse — the three properties the rendered form keeps too, so the two do not drift.