Skip to main content

Crate adf

Crate adf 

Source
Expand description

Lightweight ADF-XML parsing and writing.

The crate exposes a domain model for ADF 1.0 while retaining the original input for byte-for-byte output when a document has not been rewritten.

§Tracing and privacy

This crate emits passive tracing spans and events around parsing, validation, and writing. It does not install a subscriber; applications choose how to collect or ignore those events.

Trace fields intentionally contain only structural metadata such as byte counts, model counts, dirty flags, validation issue counts, parse options, and error categories/positions. They do not include raw XML, element text, attribute values, validation messages, names, emails, phone numbers, addresses, identifiers, URLs, comments, or extension payloads.

The public model and AdfDocument::original still expose lead payloads; avoid logging those values directly when handling sensitive data.

Structs§

Address
ADF <address> record.
Adf
Root typed representation of an ADF document.
AdfDocument
Parsed ADF document plus original-input preservation state.
Attribute
XML attribute name/value pair preserved from input or built by callers.
ColorCombination
ADF <colorcombination> record.
Contact
ADF <contact> record.
Customer
ADF <customer> record.
Finance
ADF <finance> record.
Id
ADF <id> value plus attributes.
Name
ADF <name> value plus attributes.
ParseOptions
Options controlling how strictly crate::parse_with treats the input.
Price
ADF <price> value plus attributes.
Prospect
ADF <prospect> lead record.
Provider
ADF <provider> record.
Span
Byte span into the original XML input.
TextElement
Text-like ADF element that can preserve mixed XML text parts.
Timeframe
ADF <timeframe> record.
ValidationIssue
One validation finding with a model path and optional source span.
ValidationOptions
Options controlling ADF validation strictness.
ValidationReport
Collection of validation findings for an ADF model.
Vehicle
ADF <vehicle> record.
VehicleOption
ADF <option> record under a vehicle.
Vendor
ADF <vendor> record.
XmlElement
Raw XML element used for extension content and AdfDocument::root.

Enums§

Error
Errors returned by parsing, validation-adjacent parsing checks, and writing.
Severity
Validation severity.
TextPart
One part of a text-like element value.
XmlNode
Raw XML node retained for extension and mixed-content round-tripping.

Constants§

DEFAULT_MAX_DOCTYPE_LEN
Default ceiling, in bytes, on the length of a <!DOCTYPE …> declaration’s payload. Legitimate ADF documents rarely carry a DTD at all; the cap keeps entity-definition payloads bounded while leaving room for a small declaration.

Functions§

parse
Parse an ADF-XML document with the default ParseOptions.
parse_with
Parse an ADF-XML document with explicit ParseOptions.
validate
Validate a typed ADF model with lenient default options.
validate_with
Validate a typed ADF model with explicit options.

Type Aliases§

Result
Crate result type.