Struct type_rules::rules::All
source · [−]pub struct All<'a, T>(pub T, pub &'a str);
Expand description
Rule to constrain an iterable collection (with reference) to valid the specified rule and an error message
Example
use type_rules::prelude::*;
#[derive(Validator)]
struct VecNotEmptyString(
#[rule(All(MinLength(1), "You can't use empty string"))]
Vec<String>
);
Tuple Fields
0: T
1: &'a str
Trait Implementations
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for All<'a, T> where
T: RefUnwindSafe,
impl<'a, T> Send for All<'a, T> where
T: Send,
impl<'a, T> Sync for All<'a, T> where
T: Sync,
impl<'a, T> Unpin for All<'a, T> where
T: Unpin,
impl<'a, T> UnwindSafe for All<'a, T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more