Skip to main content

PAYLOAD_DECODE_BUDGET

Constant PAYLOAD_DECODE_BUDGET 

pub const PAYLOAD_DECODE_BUDGET: usize = 8_388_608; // 8_388_608usize
Expand description

The most bytes one payload value may make its decoder allocate: lists reserve against it by their decoded size, strings and byte arrays by their length, and boxes by the size of their inner value. The budget equals the largest uncompressed packet; structured values can require more allocation than their encoded body and are refused when they exhaust it.