pub struct Interval { /* private fields */ }Expand description
Represents a numeric version interval with start and end bounds.
Implementations§
Source§impl Interval
impl Interval
Sourcepub const fn new(start: SingleConstraint, end: SingleConstraint) -> Self
pub const fn new(start: SingleConstraint, end: SingleConstraint) -> Self
Create a new interval from start and end constraints.
Sourcepub const fn start(&self) -> &SingleConstraint
pub const fn start(&self) -> &SingleConstraint
Get the start constraint.
Sourcepub const fn end(&self) -> &SingleConstraint
pub const fn end(&self) -> &SingleConstraint
Get the end constraint.
Sourcepub fn from_zero() -> SingleConstraint
pub fn from_zero() -> SingleConstraint
Create a constraint representing “from zero” (>= 0.0.0.0-dev).
Sourcepub fn until_positive_infinity() -> SingleConstraint
pub fn until_positive_infinity() -> SingleConstraint
Create a constraint representing “until positive infinity” (< MAX.0.0.0).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Interval
impl RefUnwindSafe for Interval
impl Send for Interval
impl Sync for Interval
impl Unpin for Interval
impl UnwindSafe for Interval
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