pub fn check_value_limits(key: &str, value: &Value) -> Result<()>Expand description
Validate one property value against the documented v5.0 type limits.
The receiver silently drops values that break these limits (keeping the
rest of the event), so this check is most useful before submitting data:
the debug consumer runs it in stringent mode via
Data::check_limits.
Rules enforced:
- string ≤
limits::MAX_STRING_BYTES(2 KB) - number within ±
limits::MAX_NUMBER_ABS(9E15) - list / object group ≤
limits::MAX_ARRAY_ELEMENTS(500 elements); string elements ≤limits::MAX_ARRAY_ELEMENT_BYTES(255 bytes after the receiver’s string conversion); nested objects are validated too - object ≤
limits::MAX_OBJECT_KEYS(100 sub-properties), validated recursively
key is used to build the error message.