pub enum ParamConstraint {
None,
Int,
Uuid,
Alpha,
Slug,
Custom(Regex),
}
Expand description
Parameter constraints for validation
Variants§
None
No constraint - any non-empty string
Int
Must be a valid integer
Uuid
Must be a valid UUID
Alpha
Must contain only alphabetic characters
Slug
Must be a valid slug (alphanumeric + hyphens/underscores)
Custom(Regex)
Custom regex pattern
Implementations§
Trait Implementations§
Source§impl Clone for ParamConstraint
impl Clone for ParamConstraint
Source§fn clone(&self) -> ParamConstraint
fn clone(&self) -> ParamConstraint
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 ParamConstraint
impl Debug for ParamConstraint
Source§impl PartialEq for ParamConstraint
impl PartialEq for ParamConstraint
Auto Trait Implementations§
impl Freeze for ParamConstraint
impl RefUnwindSafe for ParamConstraint
impl Send for ParamConstraint
impl Sync for ParamConstraint
impl Unpin for ParamConstraint
impl UnwindSafe for ParamConstraint
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