3 releases (breaking)

0.3.0 Jun 4, 2024
0.2.0 May 3, 2024
0.1.0 May 2, 2024

#2529 in Parser implementations

Download history 10/week @ 2024-05-25 105/week @ 2024-06-01 33/week @ 2024-06-08 10/week @ 2024-06-15 7/week @ 2024-07-27

196 downloads per month
Used in mvdparser

MIT license

6KB
80 lines

quake_clientinfo Test crates docs.rs

Parse QuakeWorld clientinfo strings

Usage

use quake_clientinfo::Clientinfo;

let info = Clientinfo::from(r#"\team\red\name\Alpha\*spectator\1"#);
assert_eq!(info.name, Some("Alpha".to_string()));
assert_eq!(info.team, Some("red".to_string()));
assert_eq!(info.spectator, Some(1));
assert_eq!(info.topcolor, None);

Fields

pub struct Clientinfo {
    pub name: Option<String>,
    pub team: Option<String>,
    pub topcolor: Option<i32>,
    pub bottomcolor: Option<i32>,
    pub spectator: Option<i32>,
    pub client: Option<String>,
    pub bot: Option<i32>,
    pub chat: Option<i32>,
}

See also

Dependencies

~5KB