pub fn write_frame(
writer: &mut impl Write,
message: Message,
) -> Result<(), ProtocolError>Expand description
Serialise message as a length-delimited JSON frame to writer.
ยงErrors
Returns ProtocolError::FrameTooLarge if the serialised body would
exceed MAX_FRAME_BYTES, or the underlying ProtocolError::Io /
ProtocolError::Json for codec failures.