Lines Matching +full:pre +full:- +full:release
1 …(https://github.com/dtolnay/semver) [![crates-io]](https://crates.io/crates/semver) [![d…
3 //! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo…
4 //! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=55555…
5 //! [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&lo…
25 //! // Check whether this requirement matches version 1.2.3-alpha.1 (no)
30 //! pre: Prerelease::new("alpha.1").unwrap(),
47 //! JavaScript, Composer for PHP, CocoaPods for Objective-C...
61 //! [Specifying Dependencies]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.ht…
82 clippy::semicolon_if_nothing_returned, // https://github.com/rust-lang/rust-clippy/issues/7324
116 /// - The major, minor, and patch numbers may be any integer 0 through u64::MAX.
120 /// - Leading zeros are forbidden in those positions. For example `1.01.00` is
123 /// - The pre-release identifier, if present, must conform to the syntax
126 /// - The build metadata, if present, must conform to the syntax documented for
129 /// - Whitespace is not allowed anywhere in the version.
137 /// - The major, minor, and patch number are compared numerically from left to
138 /// right, lexicographically ordered as a 3-tuple of integers. So for example
143 /// - When major, minor, and patch are equal, a pre-release version is
144 /// considered less than the ordinary release: version `1.0.0-alpha.1` is
147 /// - Two pre-releases of the same major, minor, patch are compared by
148 /// lexicographic ordering of dot-separated components of the pre-release
151 /// - Identifiers consisting of only digits are compared
152 /// numerically: `1.0.0-pre.8` is less than `1.0.0-pre.12`.
154 /// - Identifiers that contain a letter or hyphen are compared in ASCII sort
155 /// order: `1.0.0-pre12` is less than `1.0.0-pre8`.
157 /// - Any numeric identifier is always less than any non-numeric
158 /// identifier: `1.0.0-pre.1` is less than `1.0.0-pre.x`.
160 …-alpha` < `1.0.0-alpha.1` < `1.0.0-alpha.beta` < `1.0.0-bet…
166 pub pre: Prerelease, field
175 /// - Either `*` (meaning "any"), or one or more comma-separated comparators.
177 /// - A [`Comparator`] is an operator ([`Op`]) and a partial version, separated
180 /// - Build metadata is syntactically permitted on the partial versions, but is
184 /// - Whitespace is permitted around commas and around operators. Whitespace is
186 /// version number and its minor, patch, pre-release, or build metadata.
202 /// Non-empty pre-release is only allowed if patch is Some.
203 pub pre: Prerelease, field
209 /// -  **`=I.J.K`** — exactly the version I.J.K
210 /// -  **`=I.J`** — equivalent to `>=I.J.0, <I.(J+1).0`
211 /// -  **`=I`** — equivalent to `>=I.0.0, <(I+1).0.0`
214 /// -  **`>I.J.K`**
215 /// -  **`>I.J`** — equivalent to `>=I.(J+1).0`
216 /// -  **`>I`** — equivalent to `>=(I+1).0.0`
219 /// -  **`>=I.J.K`**
220 /// -  **`>=I.J`** — equivalent to `>=I.J.0`
221 /// -  **`>=I`** — equivalent to `>=I.0.0`
224 /// -  **`<I.J.K`**
225 /// -  **`<I.J`** — equivalent to `<I.J.0`
226 /// -  **`<I`** — equivalent to `<I.0.0`
229 /// -  **`<=I.J.K`**
230 /// -  **`<=I.J`** — equivalent to `<I.(J+1).0`
231 /// -  **`<=I`** — equivalent to `<(I+1).0.0`
235 /// -  **`~I.J.K`** — equivalent to `>=I.J.K, <I.(J+1).0`
236 /// -  **`~I.J`** — equivalent to `=I.J`
237 /// -  **`~I`** — equivalent to `=I`
241 /// -  **`^I.J.K`** (for I\>0) — equivalent to `>=I.J.K, <(I+1).0.0`
242 /// -  **`^0.J.K`** (for J\>0) — equivalent to `>=0.J.K, <0.(J+1).0`
243 /// -  **`^0.0.K`** — equivalent to `=0.0.K`
244 /// -  **`^I.J`** (for I\>0 or J\>0) — equivalent to `^I.J.0`
245 /// -  **`^0.0`** — equivalent to `=0.0`
246 /// -  **`^I`** — equivalent to `=I`
249 /// -  **`I.J.*`** — equivalent to `=I.J`
250 /// -  **`I.*`** or **`I.*.*`** — equivalent to `=I`
268 /// Optional pre-release identifier on a version string. This comes after `-` in
269 /// a SemVer version, like `1.0.0-alpha.1`
273 /// Some real world pre-release idioms drawn from crates.io:
275 /// - **[mio]** <code>0.7.0-<b>alpha.1</b></code> — the most common style
276 /// for numbering pre-releases.
278 /// - **[pest]** <code>1.0.0-<b>beta.8</b></code>, <code>1.0.0-<b>rc.0</b></code>
279 /// — this crate makes a distinction between betas and release
282 /// - **[sassers]** <code>0.11.0-<b>shitshow</b></code> — ???.
284 /// - **[atomic-utils]** <code>0.0.0-<b>reserved</b></code> — a squatted
289 /// [atomic-utils]: https://crates.io/crates/atomic-utils
292 /// *Tip:* Be aware that if you are planning to number your own pre-releases,
293 /// you should prefer to separate the numeric part from any non-numeric
294 /// identifiers by using a dot in between. That is, prefer pre-releases
296 /// spec's rule for pre-release precedence has special treatment of numeric
297 /// components in the pre-release string, but only if there are no non-digit
298 /// characters in the same dot-separated component. So you'd have `alpha.2` <
303 /// Pre-release strings are a series of dot separated identifiers immediately
305 /// alphanumerics and hyphens: `0-9`, `A-Z`, `a-z`, `-`. Identifiers must not be
310 /// Pre-releases have a total order defined by the SemVer spec. It uses
311 /// lexicographic ordering of dot-separated components. Identifiers consisting
314 /// non-numeric identifier.
329 /// - **[libgit2-sys]** <code>0.12.20+<b>1.1.0</b></code> — for this
333 /// - **[mashup]** <code>0.1.13+<b>deprecated</b></code> — just the word
338 /// - **[google-bigquery2]** <code>2.0.4+<b>20210327</b></code> — this
342 /// - **[fbthrift-git]** <code>0.0.6+<b>c7fcc0e</b></code> — this crate is
350 /// [libgit2-sys]: https://crates.io/crates/libgit2-sys
352 /// [google-bigquery2]: https://crates.io/crates/google-bigquery2
353 /// [fbthrift-git]: https://crates.io/crates/fbthrift-git
358 /// following the patch or pre-release version. Identifiers must comprise only
359 /// ASCII alphanumerics and hyphens: `0-9`, `A-Z`, `a-z`, `-`. Identifiers must
369 /// total order which is determined by lexicographic ordering of dot-separated
372 /// identifier is always less than any non-numeric identifier.
381 /// Create `Version` with an empty pre-release and build metadata.
388 /// # const fn new(major: u64, minor: u64, patch: u64) -> Version {
393 /// pre: Prerelease::EMPTY,
398 pub const fn new(major: u64, minor: u64, patch: u64) -> Self { in new()
403 pre: Prerelease::EMPTY, in new()
414 /// - `1.0` — too few numeric components. A SemVer version must have
419 /// - `1.0.01` — a numeric component has a leading zero.
421 /// - `1.0.unknown` — unexpected character in one of the components.
423 /// - `1.0.0-` or `1.0.0+` — the pre-release or build metadata are
426 /// - `1.0.0-alpha_123` — pre-release or build metadata have something
427 /// outside the allowed characters, which are `0-9`, `A-Z`, `a-z`, `-`,
430 /// - `23456789999999999999.0.0` — overflow of a u64.
431 pub fn parse(text: &str) -> Result<Self, Error> { in parse()
444 /// a pre-release version, the `VersionReq` must contain at least one
446 /// identical to the pre-release being matched, and that has a nonempty
447 /// pre-release component. Since `*` is not written with an explicit major,
448 /// minor, and patch version, and does not contain a nonempty pre-release
449 /// component, it does not match any pre-release versions.
461 /// - `>a.b` — unexpected characters in the partial version.
463 /// - `@1.0.0` — unrecognized comparison operator.
465 /// - `^1.0.0, ` — unexpected end of input.
467 /// - `>=1.0 <2.0` — missing comma between comparators.
469 /// - `*.*` — unsupported wildcard syntax.
470 pub fn parse(text: &str) -> Result<Self, Error> { in parse()
476 pub fn matches(&self, version: &Version) -> bool { in matches()
484 fn default() -> Self { in default()
490 pub fn parse(text: &str) -> Result<Self, Error> { in parse()
494 pub fn matches(&self, version: &Version) -> bool { in matches()
504 pub fn new(text: &str) -> Result<Self, Error> { in new()
508 pub fn as_str(&self) -> &str { in as_str()
512 pub fn is_empty(&self) -> bool { in is_empty()
522 pub fn new(text: &str) -> Result<Self, Error> { in new()
526 pub fn as_str(&self) -> &str { in as_str()
530 pub fn is_empty(&self) -> bool { in is_empty()