docs: add docstrings to two methods
This commit is contained in:
@@ -6,6 +6,11 @@ use anyhow::{bail, ensure, Context, Result};
|
|||||||
use super::Backend;
|
use super::Backend;
|
||||||
use crate::Package;
|
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)]
|
#[derive(Debug)]
|
||||||
pub struct ToDoPerBackend(Vec<(Box<dyn Backend>, Vec<Package>)>);
|
pub struct ToDoPerBackend(Vec<(Box<dyn Backend>, Vec<Package>)>);
|
||||||
|
|
||||||
|
|||||||
@@ -178,6 +178,13 @@ impl Pacdef {
|
|||||||
.context("printing things to do")
|
.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<ToDoPerBackend> {
|
fn get_unmanaged_packages(&mut self) -> Result<ToDoPerBackend> {
|
||||||
let mut result = ToDoPerBackend::new();
|
let mut result = ToDoPerBackend::new();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user