pub struct GroupedRules<R> { /* private fields */ }Expand description
A collection of grouped validation rules for a field.
Implementations§
Source§impl<R> GroupedRules<R>
impl<R> GroupedRules<R>
Sourcepub fn add(self, rule: R, group: ValidationGroup) -> Self
pub fn add(self, rule: R, group: ValidationGroup) -> Self
Add a rule with a group.
Sourcepub fn for_group<'a>(
&'a self,
group: &'a ValidationGroup,
) -> impl Iterator<Item = &'a R> + 'a
pub fn for_group<'a>( &'a self, group: &'a ValidationGroup, ) -> impl Iterator<Item = &'a R> + 'a
Get rules that apply to a specific group.
Trait Implementations§
Source§impl<R: Clone> Clone for GroupedRules<R>
impl<R: Clone> Clone for GroupedRules<R>
Source§fn clone(&self) -> GroupedRules<R>
fn clone(&self) -> GroupedRules<R>
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<R: Debug> Debug for GroupedRules<R>
impl<R: Debug> Debug for GroupedRules<R>
Source§impl<R: Default> Default for GroupedRules<R>
impl<R: Default> Default for GroupedRules<R>
Source§fn default() -> GroupedRules<R>
fn default() -> GroupedRules<R>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<R> Freeze for GroupedRules<R>
impl<R> RefUnwindSafe for GroupedRules<R>where
R: RefUnwindSafe,
impl<R> Send for GroupedRules<R>where
R: Send,
impl<R> Sync for GroupedRules<R>where
R: Sync,
impl<R> Unpin for GroupedRules<R>where
R: Unpin,
impl<R> UnwindSafe for GroupedRules<R>where
R: UnwindSafe,
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