pub struct AttributeValidator { /* private fields */ }
Expand description
Comprehensive attribute validator
Implementations§
Source§impl AttributeValidator
impl AttributeValidator
pub fn new() -> Self
Sourcepub fn with_policy(policy: ValidationPolicy) -> Self
pub fn with_policy(policy: ValidationPolicy) -> Self
Create validator with specific policy
Sourcepub fn add_global_rule(&mut self, attribute: QName, rule: ValidationRule)
pub fn add_global_rule(&mut self, attribute: QName, rule: ValidationRule)
Add global validation rule for an attribute
Sourcepub fn add_element_rule(
&mut self,
element: QName,
attribute: QName,
rule: ValidationRule,
)
pub fn add_element_rule( &mut self, element: QName, attribute: QName, rule: ValidationRule, )
Add element-specific validation rule
Sourcepub fn add_custom_validator<F>(&mut self, name: String, _validator: F)
pub fn add_custom_validator<F>(&mut self, name: String, _validator: F)
Add custom validation function
Sourcepub fn validate_element_attributes(
&mut self,
element_name: &QName,
attributes: &AttributeMap,
) -> ValidationResult
pub fn validate_element_attributes( &mut self, element_name: &QName, attributes: &AttributeMap, ) -> ValidationResult
Validate attributes for a specific element
Sourcepub fn validate_global_attributes(
&mut self,
attributes: &AttributeMap,
) -> ValidationResult
pub fn validate_global_attributes( &mut self, attributes: &AttributeMap, ) -> ValidationResult
Validate all attributes globally (no element context)
Trait Implementations§
Source§impl Clone for AttributeValidator
impl Clone for AttributeValidator
Source§fn clone(&self) -> AttributeValidator
fn clone(&self) -> AttributeValidator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AttributeValidator
impl Debug for AttributeValidator
Auto Trait Implementations§
impl Freeze for AttributeValidator
impl RefUnwindSafe for AttributeValidator
impl Send for AttributeValidator
impl Sync for AttributeValidator
impl Unpin for AttributeValidator
impl UnwindSafe for AttributeValidator
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