1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! A pure Rust library for parsing, managing, validating, diffing,
//! and rendering DNF/YUM `.repo` configuration files.
//!
//! # Three-Level API
//!
//! | Level | Type | Purpose |
//! |--------|----------------------------|---------------------------------------|
//! | Macro | [`ReposDir`] | Manage `/etc/yum.repos.d/` directory |
//! | Meso | [`RepoFile`] | Parse, modify, render a `.repo` file |
//! | Micro | [`Repo`], [`MainConfig`] | Type-safe access to individual fields |
//!
//! # Quick Start
//!
//! ```
//! use dnf_repofile::{RepoFile, RepoId};
//!
//! let input = "[epel]\nname=EPEL\nbaseurl=https://example.com/\n";
//! let rf = RepoFile::parse(input).unwrap();
//! let block = rf.get(&RepoId::try_new("epel").unwrap()).unwrap();
//! println!("{}", block.data.name.as_ref().unwrap());
//! ```
//!
//! # Features
//!
//! - **Parse** `.repo` files into fully-typed Rust structs
//! - **Render** back to text with comment/whitespace preservation
//! - **Validate** repository configurations
//! - **Diff** between repo files or individual repos
//! - **Builder** pattern for programmatic creation
//! - **Variable expansion** (`$releasever`, `${basearch}`, etc.)
// Re-export key types for convenience
pub use RepoBuilder;
pub use ;
pub use ;
pub use MainConfig;
pub use Repo;
pub use ;
pub use ReposDir;
pub use *;
pub use ;
pub use ;