Expand description
Runtime-neutral resource-budget measurements.
Structs§
- Invalid
Limit Range - Caller-provided bounds whose minimum exceeds their maximum.
- Limit
Exceeded - A resource-budget check whose measured amount exceeds its allowed amount.
- Limit
Measurement - A measured amount and the maximum amount allowed by a caller.
- Limit
OutOf Range - A whole-number measurement outside inclusive caller-provided bounds.
- Limit
Range - A whole-number measurement within inclusive caller-provided bounds.
Enums§
- Compact
Json Limit Error - An error from encoding and checking compact JSON.
- Limit
Range Error - An invalid range or a measurement outside a valid range.
Functions§
- byte_
length - Returns the length of a byte slice.
- check_
bytes - Measures a byte slice and checks the result.
- check_
collection - Measures a collection slice and checks the result.
- check_
compact_ json_ utf8_ bytes - Measures compact JSON UTF-8 bytes and checks the result.
- check_
measurement - Checks a measured amount against a caller-provided maximum.
- check_
range - Checks a whole-number measurement against inclusive bounds.
- check_
trimmed_ unicode_ scalars - Measures trimmed Unicode scalar values and checks the result.
- collection_
length - Returns the number of elements in a slice.
- compact_
json_ utf8_ bytes - Returns the UTF-8 byte length of the compact JSON encoding.
- trimmed_
unicode_ scalar_ count - Counts Unicode scalar values after trimming Unicode whitespace from both ends.