Skip to main content

Module quick_xml_driver

Module quick_xml_driver 

Source
Expand description

Reusable driver that wires a quick_xml::Reader event stream into a ValidationRuntime.

Two layers are provided:

DTD-related events (Event::DocType, Event::Decl) are silently dropped. Comments and processing instructions flow through the layer-2 hooks; layer 1 ignores them via NoopHandler.

Namespace scoping (xmlns push/pop), xsi:type/xsi:nil discovery, and NamespaceContextSnapshot construction are handled internally so the caller does not have to.

Structs§

AttributeView
View of a non-xmlns attribute.
DriveOutcome
Final outcome of a successful drive call.
ElementStartView
View of an element-start (or empty) event passed to handler hooks.
EndElementInfo
What the runtime returned from validate_end_element.
EndOfAttributesView
Payload for ValidationEventHandler::after_end_of_attributes.
NoopHandler
Zero-sized handler whose every method is the trait default.

Enums§

DriveError
Errors raised by the layer-1 helpers.
DriveWithError
Errors raised by the layer-2 helpers.
TextKind
How a text/CDATA event was dispatched into the runtime.

Traits§

ValidationEventHandler
Handler invoked at each validator-event boundary.

Functions§

drive_quick_xml
Drive a quick-xml stream into runtime, then call runtime.end_validation().
drive_quick_xml_in
drive_quick_xml variant that reuses a caller-supplied buffer.
drive_quick_xml_with
Drive a quick-xml stream into runtime, invoking handler at each validator-event boundary.
drive_quick_xml_with_in
drive_quick_xml_with variant that reuses a caller-supplied buffer.