Semantic version parsing and comparison.
Semantic versioning (see http://semver.org/) is a set of rules for assigning version numbers intended to convey meaning about what has changed, and how much. A version number has five parts:
-
)+
)The three mandatory components are required to be decimal numbers. The pre-release information and build metadata are required to be a period-separated list of identifiers containing only alphanumeric characters and hyphens.
An example version number with all five components is
0.8.1-rc.3.0+20130922.linux
.
bad_parse |
Version | Represents a version number conforming to the semantic versioning scheme. |
Identifier | An identifier in the pre-release or build metadata. If the identifier can
be parsed as a decimal value, it will be represented with |
parse | Parse a string into a semver object. |
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).