pub struct Negative;Expand description
Accepts strictly negative numbers (value < 0).
§Examples
use type_lib::rules::Negative;
use type_lib::Validator;
assert!(Negative::validate(&-2).is_ok());
assert!(Negative::validate(&0).is_err());Trait Implementations§
Auto Trait Implementations§
impl Freeze for Negative
impl RefUnwindSafe for Negative
impl Send for Negative
impl Sync for Negative
impl Unpin for Negative
impl UnsafeUnpin for Negative
impl UnwindSafe for Negative
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