Rust's serde implementation for the Kafka protocol.
This allows you to serialize and deserialize kafka payloads. It can be used as a building block for a native-rust kafka client.
Serializing the kafka request header:
```rust use serde::Serialize; use std::io::{Write, Cursor};
struct RequestHeader { apikey: i16, apiversion: i16, correlationid: i32, clientid: &'static str, }
let req = RequestHeader { apikey: 0, apiversion: 0, correlationid: 1, clientid: "" };
let mut x = Cursor::new(Vec::
Deserializing the kafka response header:
```rust use serde::Serialize;
struct ResponseHeader { pub correlation: i32, }
let data : Vec
All Kafka protocol types are listed here
int8 -> i8
, etc).String
and &str
, and similarly
for bytesVARLONG
and COMPACT_STRING
are not
supported (yet)