pub fn walk<'a, R, E>(
root: &SignerInfo<'a>,
parent: &Reader<'a>,
visitor: impl FnMut(Visit<'_, 'a>, &Reader<'a>) -> Result<R, E>,
) -> Result<OwnedVec<R>, WalkError<E>>Expand description
Processes all nested countersignature values with an admitted iterative stack.
RFC5652 §11.4 permits repeated attributes/values and nested countersignatures. Values are visited depth first in original sibling order, with O(depth) active frames. This order implies no chronology or application priority. Only unsigned countersignatures are visited: callers must separately retain misplaced signed attributes and unreadable values for protocol diagnostics. Each visitor receives the ORIGINAL child’s producing Reader; parsing its parameters must not reset enclosing depth or local work.
Callers select keys/providers and can run prepare::resolve with
Scope::CounterSignature and the shared verification batch against the
supplied parent signature. This operation asserts neither root-signature
validity nor trust/identity and makes no implicit key selection or I/O.
Visitors admit their own data-dependent work/storage in the supplied Reader.
Returned values must not borrow the temporary child model/Reader; they may
borrow original document bytes or own independently admitted evidence.
A semantic parse failure is delivered as a separate malformed event; a resource or visitor failure aborts and drops all temporary/collected values. Visitor external side effects cannot be rolled back by this operation. No successful partial catalogue is exposed. Retained result capacity owns its original charge independently of the parser and traversal frames. https://www.rfc-editor.org/rfc/rfc5652#section-11.4