pub struct OutsideRange<T>{ /* private fields */ }
Expand description
A Range
implementation to verify a value is outside two reference values
Implementations§
Source§impl<T: Debug + Display + Clone + PartialOrd> OutsideRange<T>
impl<T: Debug + Display + Clone + PartialOrd> OutsideRange<T>
Sourcepub fn new(lower_bound: T, upper_bound: T) -> Self
pub fn new(lower_bound: T, upper_bound: T) -> Self
Creates a new Outside Range. Valid values must be less than the lower bound, or greater than the upper bound. Both bounds specify the first invalid values ob either end.
Sourcepub fn lower_bound(&self) -> &LessThanValue<T>
pub fn lower_bound(&self) -> &LessThanValue<T>
Returns the lower bound of this range, valid values are less than this value
Sourcepub fn upper_bound(&self) -> &GreaterThanValue<T>
pub fn upper_bound(&self) -> &GreaterThanValue<T>
Returns the upper bound of this range, valid values are greater than this value
Trait Implementations§
Source§impl<T> Clone for OutsideRange<T>
impl<T> Clone for OutsideRange<T>
Source§fn clone(&self) -> OutsideRange<T>
fn clone(&self) -> OutsideRange<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T> Debug for OutsideRange<T>
impl<T> Debug for OutsideRange<T>
Source§impl<T: Debug + Display + Clone + PartialOrd> Range<T> for OutsideRange<T>
impl<T: Debug + Display + Clone + PartialOrd> Range<T> for OutsideRange<T>
type Error = InsideRangeError<T>
Source§fn value_is_valid(&self, value: &T) -> bool
fn value_is_valid(&self, value: &T) -> bool
Returns true if the value is valid for the specified range
Auto Trait Implementations§
impl<T> Freeze for OutsideRange<T>where
T: Freeze,
impl<T> RefUnwindSafe for OutsideRange<T>where
T: RefUnwindSafe,
impl<T> Send for OutsideRange<T>where
T: Send,
impl<T> Sync for OutsideRange<T>where
T: Sync,
impl<T> Unpin for OutsideRange<T>where
T: Unpin,
impl<T> UnwindSafe for OutsideRange<T>where
T: UnwindSafe,
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