Crates.io | quake_qtvinfo |
lib.rs | quake_qtvinfo |
version | 0.3.0 |
source | src |
created_at | 2024-05-04 11:46:19.868728 |
updated_at | 2024-07-16 14:27:38.812488 |
description | Parse QTV info strings. |
homepage | |
repository | https://github.com/vikpe/quake_qtvinfo |
max_upload_size | |
id | 1229548 |
size | 5,164 |
Parse QTV info strings
use quake_qtvinfo::Settings;
let settings = Settings::from(r#"\hostname\QUAKE.SE KTX Qtv\maxclients\100\*version\QTV 1.14"#);
assert_eq!(settings.version, Some("QTV 1.14".to_string()));
assert_eq!(settings.maxclients, Some(100));
assert_eq!(settings.hostname, Some("QUAKE.SE KTX Qtv".to_string()));
pub struct Settings {
pub hostname: Option<String>,
pub maxclients: Option<u32>,
pub version: Option<String>,
}