use crate::limits::Limits;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ValidationLevel {
Structural,
Full,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct ValidationOptions {
level: ValidationLevel,
limits: Limits,
}
impl ValidationOptions {
pub fn with_level(mut self, level: ValidationLevel) -> Self {
self.level = level;
self
}
pub fn with_limits(mut self, limits: Limits) -> Self {
self.limits = limits;
self
}
pub fn level(&self) -> ValidationLevel {
self.level
}
pub fn limits(&self) -> Limits {
self.limits
}
}
impl Default for ValidationOptions {
fn default() -> Self {
Self {
level: ValidationLevel::Structural,
limits: Limits::default(),
}
}
}