Expand description
Raw types of the Kafka protocol, as defined by the protocol specification.
In general, most types map closely to a corresponding rust type, with the exception of a number types that use zigzag encoded to represent length as a “compact” representation.
It is unnecessary to interact directly with these types for most use cases.
Structs§
- Array
- An array whose length is encoded with an
i32
. - Boolean
- A boolean value.
- Bytes
- A sequence of bytes, up to
i32::MAX
long. - Compact
Array - An array whose length is encoded with a varint.
- Compact
Bytes - A sequence of bytes that is encoded with a
u32
or a varint, depending on size. - Compact
String - A string whose length is encoded with a
u32
or varint. - Float64
- A struct representing [
$ty
] - Int8
- A struct representing [
$ty
] - Int16
- A struct representing [
$ty
] - Int32
- A struct representing [
$ty
] - Int64
- A struct representing [
$ty
] - Option
Struct - An optional structure
- String
- A string of length up to
i16::MAX
. - Struct
- A struct, which is encoded according to the type it represents.
- UInt16
- A struct representing [
$ty
] - UInt32
- A struct representing [
$ty
] - Unsigned
VarInt - An unsigned zigzag encoded int.
- Unsigned
VarLong - An unsigned zigzag encoded long.
- Uuid
- A v4 UUID.
- VarInt
- A zizag encoded int.
- VarLong
- A zizag encoded long.