pub fn collect_with_truncation(
output: &mut String,
new_content: &str,
max_size: usize,
truncated: &mut bool,
) -> boolExpand description
Collect content with lazy truncation (Codex pattern). Marks truncated but continues draining to prevent pipe blocking.
§Arguments
output- Accumulated output buffernew_content- New content to appendmax_size- Maximum allowed sizetruncated- Mutable flag tracking truncation state
§Returns
true if content was appended, false if truncated