From 31a9335bd5b026b42c0ef7d8c5f88079b1eded9e Mon Sep 17 00:00:00 2001 From: sharkdp Date: Wed, 22 Aug 2018 22:36:37 +0200 Subject: [PATCH] Document Config struct --- src/app.rs | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/src/app.rs b/src/app.rs index 5ecb3d53..b909b74e 100644 --- a/src/app.rs +++ b/src/app.rs @@ -23,16 +23,35 @@ pub enum PagingMode { } pub struct Config<'a> { - pub true_color: bool, - pub output_wrap: OutputWrap, - pub output_components: OutputComponents, - pub language: Option<&'a str>, - pub colored_output: bool, - pub paging_mode: PagingMode, - pub term_width: usize, + /// List of files to print pub files: Vec>, - pub theme: String, + + /// The explicitly configured language, if any + pub language: Option<&'a str>, + + /// The character width of the terminal + pub term_width: usize, + + /// Whether or not the output should be colorized + pub colored_output: bool, + + /// Whether or not the output terminal supports true color + pub true_color: bool, + + /// Style elements (grid, line numbers, ...) + pub output_components: OutputComponents, + + /// Text wrapping mode + pub output_wrap: OutputWrap, + + /// Pager or STDOUT + pub paging_mode: PagingMode, + + /// The range lines that should be printed, if specified pub line_range: Option, + + /// The syntax highlighting theme + pub theme: String, } fn is_truecolor_terminal() -> bool {