Skip to main content

Crate version_spec

Crate version_spec 

Source

Structs§

FormatOptions
Options for formatting a version into a string.
Range
A version range composed of clauses, in which any clause may match, for example ^1 || 2.3.4 - 3.0.0 || >=4, <5.
Requirement
A version requirement composed of a comparison operator and a full or partial version to match against. Build metadata is accepted when parsing, but is otherwise ignored.
Version
A version in either calendar or semantic format, with support for scopes, pre-releases, and build metadata.

Enums§

Clause
A single clause within a version range.
Op
The comparison operator of a requirement.
SpecError
UnresolvedVersionSpec
Represents an unresolved version or alias that must be resolved to a fully-qualified version.
VersionKind
The kind of version, either calendar or semantic.
VersionSpec
Represents a resolved version or alias.

Traits§

FormatsVersion
Trait for formatting a version into a string with custom options.
MatchesVersion
Trait for matching a version against the implementing type.

Functions§

is_calver_like
Returns true if the provided value looks like a calendar version string, instead of a semantic version string. This is used to determine which parser to use.
is_semver_like
Returns true if the provided value looks like a semver version string, instead of a calendar version string. This is used to determine which parser to use.

Type Aliases§

ParseError