encode_message() writes message size, but this space is not
accounted in Message::size(), leading to wrong MessageSize::size()
=> smaller reserved size => panic on put_slice()
I'm not sure if MSG_SIZE should be added to RECORD_HEADER_SIZE or directly in Message::size() method. Looking at proto doc, they consider size not a message attribute.
encode_message() writes message size, but this space is not accounted in Message::size(), leading to wrong MessageSize::size() => smaller reserved size => panic on put_slice()
I'm not sure if MSG_SIZE should be added to RECORD_HEADER_SIZE or directly in Message::size() method. Looking at proto doc, they consider size not a message attribute.