rabbitmq_versioning/lib.rs
1// Copyright (c) 2025-2026 Michael S. Klishin and Contributors
2//
3// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6// option. This file may not be copied, modified, or distributed
7// except according to those terms.
8
9//! rabbitmq-versioning: RabbitMQ version parsing, comparison, and artifact URL generation.
10//!
11//! This crate provides operations on RabbitMQ versions (version strings),
12//! including support for prerelease versions (alphas, betas, RCs).
13//!
14//! # Examples
15//!
16//! ```
17//! use rabbitmq_versioning::{Version, Prerelease};
18//!
19//! // Parse a GA version
20//! let v: Version = "4.2.3".parse().unwrap();
21//! assert!(v.is_ga());
22//!
23//! // Parse a prerelease version
24//! let alpha: Version = "4.3.0-alpha.1".parse().unwrap();
25//! assert!(alpha.is_alpha());
26//! assert!(!alpha.is_ga());
27//!
28//! // Versions are comparable
29//! assert!(v < alpha.base_version());
30//! ```
31
32pub mod errors;
33pub mod prerelease;
34pub mod version;
35
36pub use errors::Error;
37pub use prerelease::Prerelease;
38pub use version::Version;
39
40pub type Result<T> = std::result::Result<T, Error>;