pub fn read_frame(reader: &mut impl Read) -> Result<Frame, ProtocolError>Expand description
Read one length-delimited JSON frame from reader.
§Errors
Returns ProtocolError::FrameTooLarge if the framed length exceeds
MAX_FRAME_BYTES (rejected before allocation),
ProtocolError::VersionMismatch if the peer’s version does not match
PROTOCOL_VERSION, or the underlying ProtocolError::Io /
ProtocolError::Json for codec failures.