pub struct Range { /* private fields */ }Expand description
An npm version range: ||-separated alternatives, each a (possibly space-separated) set
of comparators. Rust’s VersionReq handles only comma-separated comparators and has no
||, yet || ranges are pervasive in published packages’ dependencies (e.g.
@lit/reactive-element’s ^1.6.2 || ^2.1.0). A Range parses npm’s grammar into a set of
VersionReqs and is satisfied when any alternative is — so transitive resolution works
on real-world trees. (version_req stays for the single-comparator-set case.)
Implementations§
Trait Implementations§
Source§impl From<VersionReq> for Range
impl From<VersionReq> for Range
Source§fn from(req: VersionReq) -> Range
fn from(req: VersionReq) -> Range
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Range
impl RefUnwindSafe for Range
impl Send for Range
impl Sync for Range
impl Unpin for Range
impl UnsafeUnpin for Range
impl UnwindSafe for Range
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