pub fn resolve_args(
args: &mut Value,
prior_responses: &[Invocation],
) -> Result<(), JmapError>Expand description
Resolve all #key ResultReference fields in args against prior_responses.
For every key in args that starts with #:
- Parse the value as a
ResultReference. - Find the prior response whose call-id matches
rr.result_of(index 2 of tuple). - Verify
rr.namematches the method name of that response (index 0 of tuple). - Apply
rr.pathas an RFC 6901 JSON Pointer (with RFC 8620 §3.7*extension) to the response args (index 1 of tuple). - Collect
(plain_key, resolved_value)pairs.
This is two-phase atomic: args is not modified at all unless every
#key resolves successfully. If any resolution fails, args is returned
unchanged and an error is returned.
prior_responses entries are (method_name, response_args, call_id) — same
layout as Invocation.