pub struct MinLen<const MIN: usize>;Expand description
Accepts values with at least MIN elements (inclusive).
§Examples
use type_lib::rules::MinLen;
use type_lib::Validator;
assert!(MinLen::<3>::validate("abc").is_ok());
assert!(MinLen::<3>::validate("ab").is_err());Trait Implementations§
Auto Trait Implementations§
impl<const MIN: usize> Freeze for MinLen<MIN>
impl<const MIN: usize> RefUnwindSafe for MinLen<MIN>
impl<const MIN: usize> Send for MinLen<MIN>
impl<const MIN: usize> Sync for MinLen<MIN>
impl<const MIN: usize> Unpin for MinLen<MIN>
impl<const MIN: usize> UnsafeUnpin for MinLen<MIN>
impl<const MIN: usize> UnwindSafe for MinLen<MIN>
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