use crate::argument::ArgumentBound;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct RangeConstraint {
lower: ArgumentBound,
upper: ArgumentBound,
}
impl RangeConstraint {
#[inline]
pub fn new(lower: ArgumentBound, upper: ArgumentBound) -> Self {
Self { lower, upper }
}
#[inline]
pub fn lower(&self) -> &ArgumentBound {
&self.lower
}
#[inline]
pub fn upper(&self) -> &ArgumentBound {
&self.upper
}
#[inline]
pub fn into_bounds(self) -> (ArgumentBound, ArgumentBound) {
let Self { lower, upper } = self;
(lower, upper)
}
}