pub const MAX_ENCODABLE_VALUE: u64 = 0x0200_0000;
The maximum size of a serialized object in bytes or number of elements (for eg vectors) when the size is encoded as CompactSize.
CompactSize
This is MAX_SIZE in Bitcoin Core.
MAX_SIZE