summaryrefslogtreecommitdiffstats
path: root/src/frontend/mod.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-04-25 10:34:35 +0200
committerGitHub <noreply@github.com>2019-04-25 10:34:35 +0200
commit77f8ed46dc3511e354e42c23976097c87c707024 (patch)
tree7180d2cb0409805592e24b4415b12107a2c72584 /src/frontend/mod.rs
parenta06d315386bcb5b1ed26dffa9da90947e278b536 (diff)
parent150aa2a70684c9a3069a1263306001e894305bce (diff)
Merge pull request #8 from matthiasbeyer/doc
Doc
Diffstat (limited to 'src/frontend/mod.rs')
-rw-r--r--src/frontend/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/frontend/mod.rs b/src/frontend/mod.rs
index 43e5b5e..3bb912c 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<Package>) -> Result<()>;
fn list_problems(&self, problems: Vec<Problem>) -> Result<()>;
@@ -20,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<Box<Frontend>> {
match app.value_of("output") {
None | Some("lines") => {