pub enum FieldConstraint {
Enum(Vec<Value>),
Range {
minimum: Option<Value>,
maximum: Option<Value>,
},
Pattern(String),
MergePatch(Value),
}Expand description
Field-level constraint to apply to a schema.
Variants§
Enum(Vec<Value>)
Restrict field to specific enum values.
Range
Apply numeric range constraints.
Pattern(String)
Apply string pattern constraint.
MergePatch(Value)
Apply a JSON merge-patch to the field schema.
Trait Implementations§
Source§impl Clone for FieldConstraint
impl Clone for FieldConstraint
Source§fn clone(&self) -> FieldConstraint
fn clone(&self) -> FieldConstraint
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 moreAuto Trait Implementations§
impl Freeze for FieldConstraint
impl RefUnwindSafe for FieldConstraint
impl Send for FieldConstraint
impl Sync for FieldConstraint
impl Unpin for FieldConstraint
impl UnwindSafe for FieldConstraint
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