//! Validation rule trait.
useserde_json::Value;/// A validation rule that can be applied to a field.
pubtraitRule: Send + Sync {/// Validate the given value.
////// Returns `Ok(())` if validation passes, or `Err(message)` if it fails.
fnvalidate(&self, field:&str, value:&Value, data:&Value)->Result<(), String>;/// Get the rule name for error messages.
fnname(&self)->&'staticstr;}