generated from OBJNULL/Dockerized-Rust
22 lines
435 B
Rust
22 lines
435 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] {
|
||
|
|
"training" => Some(OperationMode::Training),
|
||
|
|
"infrence" => Some(OperationMode::Infrence),
|
||
|
|
_ => None,
|
||
|
|
}
|
||
|
|
}
|