diff --git a/src/lib.rs b/src/lib.rs index 80cc6fd..c428d0e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -261,6 +261,11 @@ pub struct Version { } impl Version { + /// True if this [Version] satisfies the given [Range]. + pub fn satisfies(&self, range: &Range) -> bool { + range.satisfies(self) + } + /// True is this [Version] has a prerelease component. pub fn is_prerelease(&self) -> bool { !self.pre_release.is_empty()