Skip to main content

Module buffer

Module buffer 

Source
Expand description

no_std fixed-buffer writing helpers for provider crates.

Structs§

SnapshotEncoder
Fixed-buffer snapshot encoder used by provider request components.

Functions§

encode_snapshot
Encodes one immutable Copy snapshot after an exact measurement pass.
encode_snapshot_bounded
Encodes one immutable snapshot under an aggregate byte cap.
json_string_escaped_len
Returns the checked length of JSON string contents after escaping.
json_string_len
Returns the checked encoded length of a complete JSON string.
measure_snapshot
Measures one immutable snapshot without writing output.
measure_snapshot_bounded
Measures one immutable snapshot under an aggregate byte cap.
percent_encoded_len
Returns the checked percent-encoded length of one component.
u64_encoded_len
Returns the base-10 encoded length of an unsigned integer.
write_byte
Writes one byte into a caller-owned buffer.
write_json_string
Writes a complete JSON string with surrounding quotes.
write_json_string_escaped
Writes JSON-string contents with required escaping, without surrounding quotes.
write_percent_encoded
Writes a percent-encoded query component into a caller-owned buffer.
write_query_pair
Writes a percent-encoded query key/value pair.
write_query_separator
Writes & unless this is the first query pair.
write_query_u64
Writes a percent-encoded query key and base-10 integer value.
write_str
Writes a string into a caller-owned buffer without escaping.
write_u64
Writes a base-10 unsigned integer into a caller-owned buffer.