pub struct ValidationContext {
pub wrapper_depth: u8,
pub max_wrapper_depth: u8,
pub rule_overrides: Option<HashMap<&'static str, RuleLevel>>,
pub forced_version: Option<VastVersion>,
}Expand description
Context passed to validate_with_context. All fields have safe defaults.
Fields§
§wrapper_depth: u8Current wrapper chain depth. 0 = this document is the root.
max_wrapper_depth: u8Maximum allowed wrapper depth. IAB VAST 4.x recommends 5.
rule_overrides: Option<HashMap<&'static str, RuleLevel>>Per-rule severity overrides keyed by rule ID. None means “use all recommended defaults”.
forced_version: Option<VastVersion>Override the VAST version used for validation, ignoring the version attribute declared in the XML. None = auto-detect from the document (default). Useful for validating templates or tags where the version attribute is absent or incorrect.
Trait Implementations§
Source§impl Clone for ValidationContext
impl Clone for ValidationContext
Source§fn clone(&self) -> ValidationContext
fn clone(&self) -> ValidationContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ValidationContext
impl Debug for ValidationContext
Auto Trait Implementations§
impl Freeze for ValidationContext
impl RefUnwindSafe for ValidationContext
impl Send for ValidationContext
impl Sync for ValidationContext
impl Unpin for ValidationContext
impl UnsafeUnpin for ValidationContext
impl UnwindSafe for ValidationContext
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