pub fn for_server_code(code: &str) -> u8Expand description
Returns the exit code for a server error code from the API contract.
ยงExamples
use stratum_node_cli::exit;
assert_eq!(exit::for_server_code("conflict"), exit::CONFLICT);
assert_eq!(exit::for_server_code("something_new"), exit::UNKNOWN_SERVER_ERROR);