summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-04-26 14:45:50 +0200
committerMatthias Beyer <mail@beyermatthias.de>2021-05-11 11:22:36 +0200
commitbcd77495493c5a92abe377b74730394260ff4ff4 (patch)
tree4069e32b5260c66c4055307c00da5ebe3abcf0dd /src/config
parentb9a2249f3c8d7e475ed7f60f15036c03a1691240 (diff)
Add doc on default value helper functions
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/config')
-rw-r--r--src/config/util.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/config/util.rs b/src/config/util.rs
index 4c1deff..132ae0d 100644
--- a/src/config/util.rs
+++ b/src/config/util.rs
@@ -11,14 +11,17 @@
//! This module contains default functions that are called by serde when deserializing the
//! configuration and having to use default values.
+/// The default progress bar format
pub fn default_progress_format() -> String {
String::from("[{elapsed_precise}] ({percent:>3}%): {bar:40.cyan/blue} | {msg}")
}
+/// The default spinner format
pub fn default_spinner_format() -> String {
String::from("[{elapsed_precise}] {spinner} | {msg}")
}
+/// The default format that is used to print one package
pub fn default_package_print_format() -> String {
String::from(indoc::indoc!(
r#"
@@ -83,14 +86,17 @@ pub fn default_package_print_format() -> String {
))
}
+/// The default value for whether strict script interpolation should be used
pub fn default_strict_script_interpolation() -> bool {
true
}
+/// The default value for the shebang
pub fn default_script_shebang() -> String {
String::from("#!/bin/bash")
}
+/// The default value for the number of log lines that should be printed if a build fails
pub fn default_build_error_lines() -> usize {
10
}