fn valid_type(s: String) -> Result<(), String> {
    match &s[..] {
        "threaded" => {}
        "single_thread" => {}
        "event_loop" | "all" => {
            match std::env::consts::OS {
                "macos" => {}
                "freebsd" => {}
                "linux" => {}
                _ => return Err("Event loop is only supported on BSD systems, and eventually linux.".to_string())
            }
        }
        _ => return Err("Please select a server type [threaded|event_loop|single_thread]".to_string())
    }
    return Ok(());
}
/// Validate the correctness of the user provided Portserver type
Validate the correctness of the user provided Portserver type
Validate the correctness of the user provided Portserver type
fn valid_type(s: String) -> Result<(), String> {
    match &s[..] {
        "threaded" => {}
        "single_thread" => {}
        "event_loop" | "all" => {
            match std::env::consts::OS {
                "macos" => {}
                "freebsd" => {}
                "linux" => {}
                _ => return Err("Event loop is only supported on BSD systems, and eventually linux.".to_string())
            }
        }
        _ => return Err("Please select a server type [threaded|event_loop|single_thread]".to_string())
    }
    return Ok(());
}
fn valid_type ( s : String ) -> Result < ( ) , String > { match & s [ .. ] { " " => { } " " => { } " " | " " => { match std :: env :: consts :: OS { " " => { } " " => { } " " => { } _ => return Err ( " " . to_string ( ) ) } } _ => return Err ( " " . to_string ( ) ) } return Ok ( ( ) ) ; }
Validate the correctness of the user provided Portserver type
Validate the correctness of the user provided Portserver type
s
String
s
String