From e4134272791fbaa42c8bd3e99e7653d2b1c1d38d Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 25 Apr 2019 09:45:22 +0200 Subject: Add doc: Frontend trait --- src/frontend/mod.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/frontend/mod.rs') diff --git a/src/frontend/mod.rs b/src/frontend/mod.rs index 43e5b5e..93d2a09 100644 --- a/src/frontend/mod.rs +++ b/src/frontend/mod.rs @@ -10,6 +10,7 @@ use crate::frontend::table::TableFrontend; use crate::compare::ComparePackage; use crate::backend::Backend; +/// A Frontend represents a way to show the data to the user pub trait Frontend { fn list_packages(&self, packages: Vec) -> Result<()>; fn list_problems(&self, problems: Vec) -> Result<()>; -- cgit v1.2.3 From 23571d048e9f05b2bdef9e80bb5d8ef1673ca7d8 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 25 Apr 2019 09:46:03 +0200 Subject: Add doc: fn new_frontend() --- src/frontend/mod.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/frontend/mod.rs') diff --git a/src/frontend/mod.rs b/src/frontend/mod.rs index 93d2a09..3bb912c 100644 --- a/src/frontend/mod.rs +++ b/src/frontend/mod.rs @@ -21,6 +21,7 @@ pub mod list; pub mod json; pub mod table; +/// Helper function for building a new Frontend object based on the commandline parameters pub fn new_frontend(app: &ArgMatches, _config: &Configuration) -> Result> { match app.value_of("output") { None | Some("lines") => { -- cgit v1.2.3