- Refactor the confusing/bodgy consts backend macro to use a single `BackendInfo` struct - Combine `supports_as_dependency()` and the `switches_dependency` into a single `Option` type as that is a better representation as it is an optional backend feature. - Add more types like `Packages`, `Sections` for uniformity. - Added a crate-private prelude and switches all imports to use a prelude glob import (excluding functions because it's nice to only be importing types) - Refactored Backend section name in logging by implementing Display for `AnyBackend` that just prints the `section`
15 lines
473 B
Rust
15 lines
473 B
Rust
/*!
|
|
This module reflects the relationship between groups, sections / backends and
|
|
packages.
|
|
|
|
A [`Group`] contains one (strictly spoken zero, but this doesn't make sense) or
|
|
more [`Section`]s, which relate to individual backends. Each section contains
|
|
one (strictly spoken zero) or more [`Package`]s. On start-up `pacdef` will load
|
|
all groups using [`Group::load`], which in turn will get all packages from all
|
|
sections.
|
|
*/
|
|
|
|
pub mod group;
|
|
pub mod package;
|
|
pub mod section;
|