pub enum Validation {
Type(String),
Enum(Vec<String>),
Pattern(String),
Format(Vec<Format>),
}Expand description
a validation to apply to some value or property value
Variants§
Type(String)
ensure the value is of the given type
Enum(Vec<String>)
ensure the value is one of the given options
Pattern(String)
ensure the value matches the given regular expression
Format(Vec<Format>)
ensure the value is of the given format
Trait Implementations§
Source§impl Debug for Validation
impl Debug for Validation
Source§impl<S> Decode<S> for Validationwhere
S: ErrorSpan,
impl<S> Decode<S> for Validationwhere
S: ErrorSpan,
Source§fn decode_node(
node: &SpannedNode<S>,
ctx: &mut Context<S>,
) -> Result<Self, DecodeError<S>>
fn decode_node( node: &SpannedNode<S>, ctx: &mut Context<S>, ) -> Result<Self, DecodeError<S>>
Decodes the node from the ast
Source§impl PartialEq for Validation
impl PartialEq for Validation
impl Eq for Validation
impl StructuralPartialEq for Validation
Auto Trait Implementations§
impl Freeze for Validation
impl RefUnwindSafe for Validation
impl Send for Validation
impl Sync for Validation
impl Unpin for Validation
impl UnwindSafe for Validation
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