pub const MAX_PATH_DEPTH: usize = 16;Expand description
How many path segments a ValidationError carries before it starts
truncating (see ValidationError::path_truncated).
The path is built as the error unwinds and is held inline, so this is
most of ValidationError’s size – 296 bytes, which
Result<(), ValidationError> costs on the stack at every level of a
recursive validate. It is sized for the longest path OCPP can produce
rather than trimmed below that: array indices are segments too, so 2.1’s
chargingProfile.chargingSchedule[i].salesTariff.salesTariffEntry[j].
consumptionCost[k].cost[l].amount is eleven of them, and truncating
real paths would blunt the errors exactly where they are hardest to
diagnose by hand.