Backend trait refactors

- 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`
This commit is contained in:
ripytide
2024-04-24 17:03:42 +01:00
parent 15b50d8cb0
commit 17e42ca435
26 changed files with 524 additions and 560 deletions
+3 -8
View File
@@ -9,11 +9,6 @@ all groups using [`Group::load`], which in turn will get all packages from all
sections.
*/
mod group;
mod package;
mod section;
pub use group::Group;
pub use group::Groups;
pub use package::Package;
pub use section::Section;
pub mod group;
pub mod package;
pub mod section;