Expand description
Reusable driver that wires a quick_xml::Reader event stream into a
ValidationRuntime.
Two layers are provided:
drive_quick_xml/drive_quick_xml_in— turn-key, all you want is for the runtime’sValidationSinkto receive every diagnostic. The helper callsValidationRuntime::end_validationfor you.drive_quick_xml_with/drive_quick_xml_with_in— callback-driven, for callers that need to interleave work between validator events (typed-document construction, source-span tracking, etc). The caller is responsible forend_validationon this path; see theValidationEventHandlertrait for hook ordering.
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§
- Attribute
View - View of a non-xmlns attribute.
- Drive
Outcome - Final outcome of a successful drive call.
- Element
Start View - View of an element-start (or empty) event passed to handler hooks.
- EndElement
Info - What the runtime returned from
validate_end_element. - EndOf
Attributes View - Payload for
ValidationEventHandler::after_end_of_attributes. - Noop
Handler - Zero-sized handler whose every method is the trait default.
Enums§
- Drive
Error - Errors raised by the layer-1 helpers.
- Drive
With Error - Errors raised by the layer-2 helpers.
- Text
Kind - How a text/CDATA event was dispatched into the runtime.
Traits§
- Validation
Event Handler - Handler invoked at each validator-event boundary.
Functions§
- drive_
quick_ xml - Drive a quick-xml stream into
runtime, then callruntime.end_validation(). - drive_
quick_ xml_ in drive_quick_xmlvariant that reuses a caller-supplied buffer.- drive_
quick_ xml_ with - Drive a quick-xml stream into
runtime, invokinghandlerat each validator-event boundary. - drive_
quick_ xml_ with_ in drive_quick_xml_withvariant that reuses a caller-supplied buffer.