Skip to main content

Module bytes_io

Module bytes_io 

Source
Expand description

Kafka length-prefixed byte payloads.

This module handles opaque bytes only. UTF-8 validation belongs in crate::string.

Re-exports§

pub use self::error::BytesError;
pub use self::error::BytesErrorKind;

Modules§

error
Error types for crate::bytes_io.

Functions§

bytes_len
Encoded length of non-flexible bytes (i32 length prefix).
compact_bytes_len
Encoded length of compact bytes (unsigned varint of len + 1).
compact_nullable_bytes_len
Encoded length of nullable compact bytes.
nullable_bytes_len
Encoded length of nullable non-flexible bytes.
read_bytes
Read non-flexible bytes (i32 length prefix).
read_compact_bytes
Read compact bytes (unsigned varint of len + 1).
read_compact_nullable_bytes
Read nullable compact bytes (unsigned varint, 0 = null).
read_nullable_bytes
Read nullable non-flexible bytes (i32, -1 = null).
write_bytes
Write non-flexible bytes (i32 length prefix).
write_compact_bytes
Write compact bytes (unsigned varint of len + 1).
write_compact_nullable_bytes
Write nullable compact bytes (unsigned varint, 0 = null).
write_nullable_bytes
Write nullable non-flexible bytes (i32, -1 = null).

Type Aliases§

Result
Result alias for raw bytes read operations.