generated from OBJNULL/Dockerized-Rust
21 lines
443 B
Rust
21 lines
443 B
Rust
// Libraries
|
|
use std::env;
|
|
|
|
// Enums
|
|
pub enum OperationMode {
|
|
Training,
|
|
Infrence,
|
|
}
|
|
|
|
// Functions
|
|
pub fn get_operation_mode() -> Option<OperationMode> {
|
|
// Getting command line arguments
|
|
let args: Vec<String> = env::args().collect();
|
|
|
|
// Getting operation mode
|
|
match args[1].as_str() {
|
|
"training" => Some(OperationMode::Training),
|
|
"infrence" => Some(OperationMode::Infrence),
|
|
_ => None,
|
|
}
|
|
}
|