diff --git a/crates/pacdef_core/src/backend/todo_per_backend.rs b/crates/pacdef_core/src/backend/todo_per_backend.rs index 13f17e0..2809a28 100644 --- a/crates/pacdef_core/src/backend/todo_per_backend.rs +++ b/crates/pacdef_core/src/backend/todo_per_backend.rs @@ -6,6 +6,11 @@ use anyhow::{bail, ensure, Context, Result}; use super::Backend; use crate::Package; +/// A vector of tuples containing a `dyn Backend` and a vector of unmanaged packages +/// for that backend. +/// +/// This struct is used to store a list of unmanaged packages or missing packages +/// for all backends. #[derive(Debug)] pub struct ToDoPerBackend(Vec<(Box, Vec)>); diff --git a/crates/pacdef_core/src/core.rs b/crates/pacdef_core/src/core.rs index a2d002d..2528e27 100644 --- a/crates/pacdef_core/src/core.rs +++ b/crates/pacdef_core/src/core.rs @@ -178,6 +178,13 @@ impl Pacdef { .context("printing things to do") } + /// Get a list of unmanaged packages per backend. + /// + /// This method loops through all enabled `Backend`s whose binary is in `PATH`. + /// + /// # Errors + /// + /// This function will propagate errors. fn get_unmanaged_packages(&mut self) -> Result { let mut result = ToDoPerBackend::new();