is_version_constraint

Function is_version_constraint 

Source
pub fn is_version_constraint(version: &str) -> bool
Expand description

Checks if a string represents a version constraint rather than a direct reference.

Version constraints contain operators like ^, ~, >, <, =, or special keywords. Direct references are branch names, tag names, or commit hashes. This function now supports prefixed constraints like agents-^v1.0.0.

§Arguments

  • version - The version string to check

§Returns

Returns true if the string contains constraint operators or keywords, false for plain tags, branches, or commit hashes.