Skip to main content

validate_protocol_stream

Function validate_protocol_stream 

Source
pub fn validate_protocol_stream(
    events: &[Value],
    strict: bool,
) -> Result<(), Vec<ProtocolViolation>>
Expand description

Validate a finite structured CLI event stream: (log | progress)* -> exactly one (result | error) -> end.

strict is forwarded to validate_protocol_event for every event.

Unlike validate_protocol_event, this collects every violation across the whole stream instead of failing fast on the first one; per-event violation pointers are prefixed with the event’s index (/{idx}{pointer}).