Add docs to ui/file.rs
This commit is contained in:
parent
2334b0bc8a
commit
43bf526740
1 changed files with 12 additions and 0 deletions
|
@ -5,6 +5,9 @@ use std::ops::Deref;
|
||||||
|
|
||||||
use storage::file::File;
|
use storage::file::File;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Trait for a printer which can be used to print data from files
|
||||||
|
*/
|
||||||
pub trait FilePrinter {
|
pub trait FilePrinter {
|
||||||
|
|
||||||
fn new(verbose: bool, debug: bool) -> Self;
|
fn new(verbose: bool, debug: bool) -> Self;
|
||||||
|
@ -40,6 +43,9 @@ pub trait FilePrinter {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Printer which prints in debug mode if enabled
|
||||||
|
*/
|
||||||
struct DebugPrinter {
|
struct DebugPrinter {
|
||||||
debug: bool,
|
debug: bool,
|
||||||
}
|
}
|
||||||
|
@ -68,6 +74,9 @@ impl FilePrinter for DebugPrinter {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simple printer, which just uses the info!() macro or debug!() macro if in debug mode.
|
||||||
|
*/
|
||||||
struct SimplePrinter {
|
struct SimplePrinter {
|
||||||
verbose: bool,
|
verbose: bool,
|
||||||
debug: bool,
|
debug: bool,
|
||||||
|
@ -107,6 +116,9 @@ impl FilePrinter for SimplePrinter {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Table printer to print file information in a nice ASCII-table
|
||||||
|
*/
|
||||||
pub struct TablePrinter {
|
pub struct TablePrinter {
|
||||||
verbose: bool,
|
verbose: bool,
|
||||||
debug: bool,
|
debug: bool,
|
||||||
|
|
Loading…
Reference in a new issue