pub fn subscribe_error_frame(
stream_id: u32,
error: &ProtocolError,
) -> Result<Frame, ProtocolError>Expand description
Construct a SubscribeError frame for a failed subscription negotiation.
This keeps schema incompatibility visible on the subscription stream as an
explicit protocol error frame with the stable numeric reason code carried by
ProtocolError::reason_code.
ยงErrors
Returns ProtocolError::InvalidStream when stream_id is not an
application stream.