pub enum ValidationRules {
StringHandler {
max_length: Option<usize>,
required: bool,
},
DateHandler {
canonical_format: String,
required: bool,
},
EnumHandler {
values: Vec<String>,
required: bool,
},
ExpverHandler {
default: Option<String>,
required: bool,
},
IntHandler {
range: Option<[i64; 2]>,
required: bool,
},
FloatHandler {
range: Option<[f64; 2]>,
required: bool,
},
TimeHandler {
required: bool,
},
PolygonHandler {
required: bool,
},
}Expand description
Validation rules for different field types
Variants§
StringHandler
String field validation with optional length constraints
DateHandler
Date field validation with configurable output format
EnumHandler
Enumerated value validation against allowed options
ExpverHandler
Experiment version field validation with default values
IntHandler
Integer validation with optional range constraints
FloatHandler
Floating-point validation with optional range constraints
TimeHandler
Time field validation supporting multiple input formats
PolygonHandler
Polygon coordinate validation for spatial data
Implementations§
Source§impl ValidationRules
impl ValidationRules
Sourcepub fn is_required(&self) -> bool
pub fn is_required(&self) -> bool
Check if this validation rule requires the field to be present
Trait Implementations§
Source§impl Clone for ValidationRules
impl Clone for ValidationRules
Source§fn clone(&self) -> ValidationRules
fn clone(&self) -> ValidationRules
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 ValidationRules
impl Debug for ValidationRules
Source§impl<'de> Deserialize<'de> for ValidationRules
impl<'de> Deserialize<'de> for ValidationRules
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ValidationRules
impl RefUnwindSafe for ValidationRules
impl Send for ValidationRules
impl Sync for ValidationRules
impl Unpin for ValidationRules
impl UnsafeUnpin for ValidationRules
impl UnwindSafe for ValidationRules
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