pub fn encode_into( frame: &Frame, buf: &mut BytesMut, ) -> Result<(), ProtocolError>
Encode a frame into an existing buffer.
Returns an error if the frame is too large or encoding fails.