Initial commit.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
use crate::server_mode::ServerMode::{Mocked, Real};
|
||||
|
||||
pub enum ServerMode {
|
||||
Mocked,
|
||||
Real
|
||||
}
|
||||
|
||||
impl ServerMode {
|
||||
pub fn from_string(value: String) -> Option<ServerMode> {
|
||||
match value.as_str() {
|
||||
"mocked" => Some(Mocked),
|
||||
"real" => Some(Real),
|
||||
_ => None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user