Module variable_int

Module variable_int 

Source
Expand description

BeBytes-compatible variable length integer implementation for MQTT

This module provides a variable length integer type that integrates with BeBytes 2.3.0 for automatic serialization/deserialization with size expressions support.

Structs§

VariableInt
Variable length integer as defined by MQTT specification

Constants§

VARIABLE_BYTE_INT_MAX
Maximum value that can be encoded as a variable byte integer (compatibility constant)
VARIABLE_INT_MAX
Maximum value that can be encoded as a variable byte integer (268,435,455)

Functions§

decode_variable_int
Decodes a variable byte integer from the buffer (compatibility function)
encode_variable_int
Encodes a u32 value as a variable byte integer (compatibility function)
encoded_variable_int_len
Alias for variable_int_len for consistency (compatibility function)
variable_int_len
Calculates the number of bytes needed to encode a value (compatibility function)