Module prost::encoding
[−]
[src]
Utility functions and types for encoding and decoding Protobuf types.
Modules
bool | |
bytes | |
double | |
fixed32 | |
fixed64 | |
float | |
int32 | |
int64 | |
map | |
message | |
sfixed32 | |
sfixed64 | |
sint32 | |
sint64 | |
string | |
uint32 | |
uint64 |
Enums
WireType |
Constants
MAX_TAG | |
MIN_TAG |
Functions
check_wire_type |
Checks that the expected wire type matches the actual wire type, or returns an error result. |
decode_key |
Decodes a Protobuf field key, which consists of a wire type designator and the field tag. |
decode_varint |
Decodes a LEB128-encoded variable length integer from the buffer. |
encode_key |
Encodes a Protobuf field key, which consists of a wire type designator and the field tag. |
encode_varint |
Encodes an integer value into LEB128 variable length format, and writes it to the buffer. The buffer must have enough remaining space (maximum 10 bytes). |
encoded_len_varint |
Returns the encoded length of the value in LEB128 variable length format. The returned value will be between 1 and 10, inclusive. |
invalid_data |
Returns an invalid data IO error wrapping the provided cause. |
invalid_input |
Returns an invalid input IO error wrapping the provided cause. |
key_len |
Returns the width of an encoded Protobuf field key with the given tag. The returned width will be between 1 and 5 bytes (inclusive). |
skip_field |