created configuration module

This commit is contained in:
2019-06-04 22:31:37 +02:00
parent d94db33544
commit 126d0da7c7
3 changed files with 24 additions and 2 deletions

7
src/configuration.rs Normal file
View File

@@ -0,0 +1,7 @@
//! File: configuration.rs
//! Description: Definition file for the configuration namespace
//! Author:Jali <jali@orca-central.de>
//! Created On: Tue 04 Jun 2019 10:06:53 pm CEST
//! Last Modified: Tue 04 Jun 2019 10:06:53 pm CEST
pub mod configuration;

View File

@@ -0,0 +1,15 @@
//! File: settings.rs
//! Description: Defines a stuct that holds all of the configuration settings passed to the program
//! by command line.
//! Author: Jali <jali@orca-central.de>
//! Created On: Tue 04 Jun 2019 10:30:46 pm CEST
//! Last Modified: TIMESTAMP
/**
* Defines a data stucture to to store the configuration in.
*/
pub struct settings {
Foreground: bool,
Plugins: Vec<String>,
Port: i32,
}

View File

@@ -27,7 +27,7 @@ fn main() {
* server lines * server lines
*/ */
fn parse_command_line<'a>() -> ArgMatches<'a> { fn parse_command_line<'a>() -> ArgMatches<'a> {
App::new("gopherbridge") return App::new("gopherbridge")
.version("0.1") .version("0.1")
.author("jali@orca-central.de") .author("jali@orca-central.de")
.about("a simple modular gopher server, that pushes converted web-content to a client") .about("a simple modular gopher server, that pushes converted web-content to a client")
@@ -53,5 +53,5 @@ fn parse_command_line<'a>() -> ArgMatches<'a> {
.help("Specifies the port the server listens on. Default is 70") .help("Specifies the port the server listens on. Default is 70")
.takes_value(true), .takes_value(true),
) )
.get_matches() .get_matches();
} }