Crates.io | quake_serverinfo |
lib.rs | quake_serverinfo |
version | 0.7.0 |
source | src |
created_at | 2024-04-27 15:15:21.600386 |
updated_at | 2024-07-16 15:47:18.915679 |
description | Parse QuakeWorld serverinfo strings. |
homepage | |
repository | https://github.com/vikpe/quake_serverinfo |
max_upload_size | |
id | 1222688 |
size | 10,339 |
Parse QuakeWorld serverinfo strings
use quake_serverinfo::Settings;
let settings = Settings::from(r#"\maxfps\77\matchtag\kombat"#);
assert_eq!(settings.maxfps, Some(77));
assert_eq!(settings.matchtag, Some("kombat".to_string()));
pub struct Settings {
pub admin: Option<String>,
pub deathmatch: Option<i32>,
pub epoch: Option<i32>,
pub fpd: Option<i32>,
pub fraglimit: Option<i32>,
pub gamedir: Option<String>,
pub hostname: Option<String>,
pub ktxmode: Option<String>,
pub ktxver: Option<String>,
pub map: Option<String>,
pub matchtag: Option<String>,
pub maxclients: Option<i32>,
pub maxfps: Option<i32>,
pub maxspectators: Option<i32>,
pub mode: Option<String>,
pub needpass: Option<i32>,
pub pm_ktjump: Option<i32>,
pub progs: Option<String>,
pub qvm: Option<String>,
pub status: Option<String>,
pub serverdemo: Option<String>,
pub sv_antilag: Option<i32>,
pub teamplay: Option<i32>,
pub timelimit: Option<i32>,
pub version: Option<String>,
pub z_ext: Option<i32>,
}