Module kafka_protocol::protocol::types
source · 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§
- An array whose length is encoded with an
i32
. - A boolean value.
- A sequence of bytes, up to
i32::MAX
long. - An array whose length is encoded with a varint.
- A sequence of bytes that is encoded with a
u32
or a varint, depending on size. - A string whose length is encoded with a
u32
or varint. - A struct representing [
$ty
] - A struct representing [
$ty
] - A struct representing [
$ty
] - A struct representing [
$ty
] - A struct representing [
$ty
] - An optional structure
- A string of length up to
i16::MAX
. - A struct, which is encoded according to the type it represents.
- A struct representing [
$ty
] - A struct representing [
$ty
] - An unsigned zigzag encoded int.
- An unsigned zigzag encoded long.
- A v4 UUID.
- A zizag encoded int.
- A zizag encoded long.