From d7075bce86d194da7b52577f6321a55d6c3b5873 Mon Sep 17 00:00:00 2001 From: Maddox Werts Date: Mon, 17 Mar 2025 10:14:56 -0400 Subject: [PATCH] Added config --- project/src/config.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 project/src/config.rs diff --git a/project/src/config.rs b/project/src/config.rs new file mode 100644 index 0000000..b6714aa --- /dev/null +++ b/project/src/config.rs @@ -0,0 +1,21 @@ +// Libraries +use std::env; + +// Enums +pub enum OperationMode { + Training, + Infrence, +} + +// Functions +pub fn get_operation_mode() -> Option { + // Getting command line arguments + let args: Vec = env::args().collect(); + + // Getting operation mode + match &args[1] { + "training" => Some(OperationMode::Training), + "infrence" => Some(OperationMode::Infrence), + _ => None, + } +}