pub struct ValidationSettings {
pub required: bool,
pub character_limits: Option<CharacterLimits>,
pub pattern: Option<PatternSettings>,
pub allowed_values: Option<AllowedValues>,
pub display_mask: Option<DisplayMask>,
pub external_validation_enabled: bool,
}Fields§
§required: bool§character_limits: Option<CharacterLimits>§pattern: Option<PatternSettings>§allowed_values: Option<AllowedValues>§display_mask: Option<DisplayMask>§external_validation_enabled: boolImplementations§
Source§impl ValidationSettings
impl ValidationSettings
pub fn resolve(&self) -> ValidationConfig
pub fn merge_rules<'a>( rules: impl IntoIterator<Item = &'a ValidationSettings>, ) -> Result<Self, ValidationMergeError>
pub fn merge_rule( &mut self, rule: &ValidationSettings, ) -> Result<(), ValidationMergeError>
Trait Implementations§
Source§impl Clone for ValidationSettings
impl Clone for ValidationSettings
Source§fn clone(&self) -> ValidationSettings
fn clone(&self) -> ValidationSettings
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 ValidationSettings
impl Debug for ValidationSettings
Source§impl Default for ValidationSettings
impl Default for ValidationSettings
Source§fn default() -> ValidationSettings
fn default() -> ValidationSettings
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ValidationSettings
impl<'de> Deserialize<'de> for ValidationSettings
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 ValidationSettings
impl RefUnwindSafe for ValidationSettings
impl Send for ValidationSettings
impl Sync for ValidationSettings
impl Unpin for ValidationSettings
impl UnsafeUnpin for ValidationSettings
impl UnwindSafe for ValidationSettings
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