brawl-rs 0.1.0

A Rust wrapper for the Brawl Stars API
Documentation
//! Brawler identifiers and constants.
//!
//! This module provides an enum of all brawlers in Brawl Stars with their unique IDs.

/// Unique identifiers for all brawlers in Brawl Stars.
///
/// Each brawler has a unique ID that is used by the Brawl Stars API.
/// This enum provides type-safe access to these IDs.
///
/// # Examples
///
/// ```no_run
/// use brawl_rs::data::brawlers::BrawlerId;
///
/// let shelly_id = BrawlerId::Shelly.as_u32();
/// assert_eq!(shelly_id, 16000000);
/// ```
#[derive(Clone, Copy)]
#[repr(u32)]
pub enum BrawlerId {
    Shelly = 16000000,
    Colt = 16000001,
    Bull = 16000002,
    Brock = 16000003,
    Rico = 16000004,
    Spike = 16000005,
    Barley = 16000006,
    Jessie = 16000007,
    Nita = 16000008,
    Dynamike = 16000009,
    ElPrimo = 16000010,
    Mortis = 16000011,
    Crow = 16000012,
    Poco = 16000013,
    Bo = 16000014,
    Piper = 16000015,
    Pam = 16000016,
    Tara = 16000017,
    Darryl = 16000018,
    Penny = 16000019,
    Frank = 16000020,
    Gene = 16000021,
    Tick = 16000022,
    Leon = 16000023,
    Rosa = 16000024,
    Carl = 16000025,
    Bibi = 16000026,
    Bit8 = 16000027,
    Sandy = 16000028,
    Bea = 16000029,
    Emz = 16000030,
    MrP = 16000031,
    Max = 16000032,
    Jacky = 16000034,
    Gale = 16000035,
    Nani = 16000036,
    Sprout = 16000037,
    Surge = 16000038,
    Colette = 16000039,
    Amber = 16000040,
    Lou = 16000041,
    Byron = 16000042,
    Edgar = 16000043,
    Ruffs = 16000044,
    Stu = 16000045,
    Belle = 16000046,
    Squeak = 16000047,
    Grom = 16000048,
    Buzz = 16000049,
    Griff = 16000050,
    Ash = 16000051,
    Meg = 16000052,
    Lola = 16000053,
    Fang = 16000054,
    Eve = 16000056,
    Janet = 16000057,
    Bonnie = 16000058,
    Otis = 16000059,
    Sam = 16000060,
    Gus = 16000061,
    Buster = 16000062,
    Chester = 16000063,
    Gray = 16000064,
    Mandy = 16000065,
    RT = 16000066,
    Willow = 16000067,
    Maisie = 16000068,
    Hank = 16000069,
    Cordelius = 16000070,
    Doug = 16000071,
    Pearl = 16000072,
    Chuck = 16000073,
    Charlie = 16000074,
    Mico = 16000075,
    Kit = 16000076,
    LarryLawrie = 16000077,
    Melodie = 16000078,
    Angelo = 16000079,
    Draco = 16000080,
    Lily = 16000081,
    Berry = 16000082,
    Clancy = 16000083,
    Moe = 16000084,
    Kenji = 16000085,
    Shade = 16000086,
    Juju = 16000087,
    Meeple = 16000089,
    Ollie = 16000090,
    Lumi = 16000091,
    Finx = 16000092,
    JaeYong = 16000093,
    Kaze = 16000094,
    Alli = 16000095,
    Trunk = 16000096,
    Mina = 16000097,
    Ziggy = 16000098,
    Pierce = 16000099,
    Gigi = 16000100,
    Glowbert = 16000101,
    Sirius = 16000102,
    Najia = 16000103,
}

impl BrawlerId {
    pub fn as_u32(&self) -> u32 {
        *self as u32
    }
}

impl std::fmt::Display for BrawlerId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.as_u32())
    }
}