Skip to main content

validate_frame_envelope

Function validate_frame_envelope 

Source
pub fn validate_frame_envelope(
    frame: &Frame,
    expected_kind: FrameKind,
    expected_payload_protocol: u32,
) -> Result<(), FrameValidationError>
Expand description

Validate the four v1 envelope fields shared by every framed exchange.

Check order is fixed (version, kind, payload protocol, encoding) and matches every pre-existing call site, so the first failure reported is identical to the previous hand-rolled validators.