pub fn encode_request(header: &[u8], body: &[u8]) -> Result<BytesMut>Expand description
Encode a request as [i32-BE length][header bytes][body bytes].
The length covers header + body only — it does NOT include the 4-byte
prefix itself (matching the Kafka wire format).
Header serialization is the caller’s responsibility; this helper takes
the already-encoded header bytes so it does not depend on
crate::generated::request_header.