pub trait VersionRequirementMatcher: Send + Sync {
// Required method
fn is_latest_satisfying(&self, requirement: &str, latest: &str) -> bool;
}Expand description
Generic version requirement matcher.
Each ecosystem implements this to provide version matching logic. Used by handlers to determine if a dependency is up-to-date.
Required Methods§
Sourcefn is_latest_satisfying(&self, requirement: &str, latest: &str) -> bool
fn is_latest_satisfying(&self, requirement: &str, latest: &str) -> bool
Check if the latest available version satisfies the requirement.
Returns true if the dependency is “up to date” within its constraint.
§Examples
For Cargo/npm (semver):
"^1.0.0"with latest"1.5.0"→ true (satisfies ^1.0.0)"^1.0.0"with latest"2.0.0"→ false (new major version)
For PyPI (PEP 440):
">=8.0"with latest"8.3.5"→ true (same major version)">=8.0"with latest"9.0.0"→ false (new major version)