pub fn parse_driver_message(
value: &Value,
limits: &Limits,
) -> Result<(), ParseError>Expand description
Validate one driver → adapter message.
Driver traffic is read tolerantly: unknown fields in the envelope and in
the driver’s nested objects (marker, logs, limits) are ignored and
passed through to the caller, so a newer driver can add a field without
breaking an adapter published before it existed.
The asymmetry is about who is speaking, not about the message: adapter
traffic crosses an untrusted boundary, where an unknown field is a signal
rather than an extension. Tolerance is not leniency either — known fields
keep their types, and the closed sets (message types, error codes,
subscribe, roles, actions) stay closed in both directions.
§Errors
Returns a ParseError whose code is bad-version, malformed or
limit-exceeded.