#steam #tf2 #schema #enums #team #fortress #type

tf2-enum

Provides enumerated types for models related to the Team Fortress 2 item schema

17 unstable releases

new 0.9.2 May 6, 2024
0.9.1 Oct 8, 2023
0.9.0 Sep 26, 2023
0.8.1 Feb 27, 2023
0.3.1 Mar 17, 2022

#405 in Database interfaces

Download history 21/week @ 2024-02-21 32/week @ 2024-02-28 1/week @ 2024-03-06 11/week @ 2024-03-13 3/week @ 2024-03-20 4/week @ 2024-03-27 9/week @ 2024-04-03 48/week @ 2024-04-10 105/week @ 2024-05-01

153 downloads per month
Used in tf2-sku

MIT license

51KB
1K SLoC

tf2-enum

Provides enumerated types for models related to the Team Fortress 2 item schema.

Usage

use tf2_enum::{Quality, KillstreakTier};
use std::str::FromStr;

assert_eq!(
    "Unusual".parse::<Quality>().unwrap(),
    Quality::Unusual,
);
assert_eq!(
    Quality::Unusual as u32,
    5,
);
assert_eq!(
    KillstreakTier::Professional.to_string(),
    "Professional Killstreak",
);

License

MIT


lib.rs:

tf2-enum

Provides enumerated types for models related to the Team Fortress 2 item schema.

Usage

use tf2_enum::{Quality, KillstreakTier};
use std::str::FromStr;

assert_eq!(
    "Unusual".parse::<Quality>().unwrap(),
    Quality::Unusual,
);
assert_eq!(
    Quality::Unusual as u32,
    5,
);
assert_eq!(
    KillstreakTier::Professional.to_string(),
    "Professional Killstreak",
);

Dependencies

~0.5–1.1MB
~25K SLoC