From 3e2c3341ee4fd540126f822ef23aa442508cf4b6 Mon Sep 17 00:00:00 2001 From: boasting-squirrel Date: Wed, 13 Feb 2019 19:13:34 +0100 Subject: Added some docstrings --- src/main.rs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 080124d..7c31976 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,16 +12,36 @@ mod auth; mod listing; #[derive(Clone, Debug)] +/// Configuration of the Miniserve application pub struct MiniserveConfig { + /// Enable verbose mode pub verbose: bool, + + /// Path to be served by miniserve pub path: std::path::PathBuf, + + /// Port on which miniserve will be listening pub port: u16, + + /// IP address(es) on which miniserve will be available pub interfaces: Vec, + + /// Enable HTTP basic authentication pub auth: Option, + + /// If false, miniserve will serve the current working directory pub path_explicitly_chosen: bool, + + /// Enable symlink resolution pub no_symlinks: bool, + + /// Enable random route generation pub random_route: Option, + + /// Sort files/directories pub sort_method: listing::SortingMethods, + + /// Enable inverse sorting pub reverse_sort: bool, } @@ -152,7 +172,8 @@ fn main() { let _ = sys.run(); } -pub fn configure_app(app: App) -> App { +/// Configures the Actix application +fn configure_app(app: App) -> App { let s = { let path = &app.state().path; let no_symlinks = app.state().no_symlinks; -- cgit v1.2.3