Skip to main content

with_token

Function with_token 

Source
pub fn with_token<X: BinaryXml, R, C>(
    xml: &X,
    location: Location<X::Id, X::Document, X::Generation>,
    operation: &Reader<'_>,
    visitor: impl for<'source> FnOnce(Token<'source>, &Reader<'source>) -> Result<R, C>,
) -> BinaryResult<R, X, TokenError<C>>
Expand description

Reads the carried RFC3161 CMS token through its existing common kernel.

The visitor can inspect retained faults or run Token::check against the selected TSA certificate and original covered input. Reading alone establishes neither timestamp mathematics nor authority/trust. Errors from a complete check, including its retained inner SourceMaps, keep the binary/XML enclosure. No new grammar, encoded copy or replacement default-budget parser is used.