Struct type_rules::rules::MaxRange
source · [−]pub struct MaxRange<T: PartialOrd<T>>(pub T);
Expand description
Rule to constraint the maximum
range of any type that implement PartialOrd
Example
use type_rules::prelude::*;
use chrono::prelude::*;
#[derive(Validator)]
struct BirthDate(#[rule(MaxRange(Utc::now()))] DateTime<Utc>);
Tuple Fields
0: T
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for MaxRange<T> where
T: RefUnwindSafe,
impl<T> Send for MaxRange<T> where
T: Send,
impl<T> Sync for MaxRange<T> where
T: Sync,
impl<T> Unpin for MaxRange<T> where
T: Unpin,
impl<T> UnwindSafe for MaxRange<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