pub struct Bound { /* private fields */ }Expand description
Represents a version boundary (inclusive or exclusive). Used to determine the range of versions a constraint covers.
Implementations§
Source§impl Bound
impl Bound
Sourcepub fn zero() -> Self
pub fn zero() -> Self
The zero bound: 0.0.0.0-dev (inclusive). Represents the absolute minimum version.
Sourcepub fn positive_infinity() -> Self
pub fn positive_infinity() -> Self
Positive infinity bound (exclusive).
PHP uses PHP_INT_MAX which is 9223372036854775807 on 64-bit.
Sourcepub const fn is_inclusive(&self) -> bool
pub const fn is_inclusive(&self) -> bool
Check if this bound is inclusive.
Sourcepub fn is_positive_infinity(&self) -> bool
pub fn is_positive_infinity(&self) -> bool
Check if this is the positive infinity bound.
Sourcepub fn compare_to(&self, other: &Self) -> Ordering
pub fn compare_to(&self, other: &Self) -> Ordering
Compare this bound to another. Returns ordering based on version comparison and inclusivity.
Sourcepub fn compare_as_lower(&self, other: &Self) -> Ordering
pub fn compare_as_lower(&self, other: &Self) -> Ordering
Compare for lower bound context. In lower bounds, inclusive is “smaller” (starts earlier).
Sourcepub fn compare_as_upper(&self, other: &Self) -> Ordering
pub fn compare_as_upper(&self, other: &Self) -> Ordering
Compare for upper bound context. In upper bounds, exclusive is “smaller” (ends earlier).
Trait Implementations§
impl Eq for Bound
impl StructuralPartialEq for Bound
Auto Trait Implementations§
impl Freeze for Bound
impl RefUnwindSafe for Bound
impl Send for Bound
impl Sync for Bound
impl Unpin for Bound
impl UnwindSafe for Bound
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