pub struct Assertion {
pub test: String,
pub namespaces: Vec<(Option<String>, String)>,
pub xpath_default_namespace: Option<String>,
}Expand description
XSD 1.1 <xs:assert test="…"> / <xs:assertion test="…">.
Captures an XPath 2.0 expression that’s evaluated during
validation: against the element being validated (for xs:assert
on a complex type) or against the simple-type value bound to
$value (for xs:assertion inside a simple-type restriction).
The expression is stored as its source string and parsed lazily
by the validator.
Fields§
§test: StringThe verbatim XPath expression from the test= attribute.
namespaces: Vec<(Option<String>, String)>Namespace bindings in scope at the assert/assertion element —
used to resolve prefixed names in test at evaluation time.
xpath_default_namespace: Option<String>XSD 1.1 xpathDefaultNamespace — the URI an unprefixed
element name in test defaults to. None means the no-
namespace default.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Assertion
impl RefUnwindSafe for Assertion
impl Send for Assertion
impl Sync for Assertion
impl Unpin for Assertion
impl UnsafeUnpin for Assertion
impl UnwindSafe for Assertion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more