Module 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§

Array
An array whose length is encoded with an i32.
Boolean
A boolean value.
Bytes
A sequence of bytes, up to i32::MAX long.
CompactArray
An array whose length is encoded with a varint.
CompactBytes
A sequence of bytes that is encoded with a u32 or a varint, depending on size.
CompactString
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]
OptionStruct
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]
UnsignedVarInt
An unsigned zigzag encoded int.
UnsignedVarLong
An unsigned zigzag encoded long.
Uuid
A v4 UUID.
VarInt
A zizag encoded int.
VarLong
A zizag encoded long.