pub struct ArrayType { /* private fields */ }Implementations§
Source§impl ArrayType
impl ArrayType
Sourcepub fn min_length(self, min: usize) -> Self
pub fn min_length(self, min: usize) -> Self
Set the minimum length of the array.
Sourcepub fn max_length(self, max: usize) -> Self
pub fn max_length(self, max: usize) -> Self
Set the maximum length of the array.
Sourcepub fn some(self, rule: Box<dyn Validator>) -> Self
pub fn some(self, rule: Box<dyn Validator>) -> Self
Set a rule for at least one item in the array.
Sourcepub fn at(self, index: usize, rule: Box<dyn Validator>) -> Self
pub fn at(self, index: usize, rule: Box<dyn Validator>) -> Self
Set a rule for a specific item in the array.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ArrayType
impl !RefUnwindSafe for ArrayType
impl !Send for ArrayType
impl !Sync for ArrayType
impl Unpin for ArrayType
impl !UnwindSafe for ArrayType
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