steamid-utils 0.1.1

Simple parser to detect and translate SteamID64 / Steam32 / Steam3 formats
Documentation
  • Coverage
  • 0%
    0 out of 15 items documented0 out of 6 items with examples
  • Size
  • Source code size: 10.77 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.91 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 14s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • bluejellybean

steamid-utils

steamid-utils converts any valid string versrion of a steamID to any other valid steamID.


use steamid_parser::{parse_incoming_format, SteamIdKind, SteamIdError};
//               ^^^^^^^^^^^^^^  this is your crate name (hyphens become underscores)

fn main() {
    let input = "76561197960265728";

    match parse_incoming_format(input) {
        Ok(kind) => {
            println!("Valid Steam ID detected: {:?}", kind);
            // Example output: Valid Steam ID detected: Steam64
        }
        Err(e) => {
            eprintln!("Invalid Steam ID: {}", e);
        }
    }

    // You can also do short aliases if you want
    use steamid_parser::SteamIdKind as IdType;

    let id_type = parse_incoming_format("STEAM_1:0:12345678").unwrap();
    assert_eq!(id_type, IdType::Steam32);
}

Contribute

Pull requests are welcomed and encouraged!


If you have any questions, suggestions, or bugs reports please feel free to open an issue.