#[repr(u8)]pub enum SpecId {
Show 40 variants
Arms = 1,
Fury = 2,
ProtWarrior = 3,
HolyPaladin = 4,
ProtPaladin = 5,
Retribution = 6,
BeastMastery = 7,
Marksmanship = 8,
Survival = 9,
Assassination = 10,
Outlaw = 11,
Subtlety = 12,
Discipline = 13,
HolyPriest = 14,
Shadow = 15,
Blood = 16,
FrostDK = 17,
Unholy = 18,
Elemental = 19,
Enhancement = 20,
RestoShaman = 21,
Arcane = 22,
Fire = 23,
FrostMage = 24,
Affliction = 25,
Demonology = 26,
Destruction = 27,
Brewmaster = 28,
Mistweaver = 29,
Windwalker = 30,
Balance = 31,
Feral = 32,
Guardian = 33,
RestoDruid = 34,
Havoc = 35,
Vengeance = 36,
Devourer = 40,
Devastation = 37,
Preservation = 38,
Augmentation = 39,
}Variants§
Arms = 1
Fury = 2
ProtWarrior = 3
HolyPaladin = 4
ProtPaladin = 5
Retribution = 6
BeastMastery = 7
Marksmanship = 8
Survival = 9
Assassination = 10
Outlaw = 11
Subtlety = 12
Discipline = 13
HolyPriest = 14
Shadow = 15
Blood = 16
FrostDK = 17
Unholy = 18
Elemental = 19
Enhancement = 20
RestoShaman = 21
Arcane = 22
Fire = 23
FrostMage = 24
Affliction = 25
Demonology = 26
Destruction = 27
Brewmaster = 28
Mistweaver = 29
Windwalker = 30
Balance = 31
Feral = 32
Guardian = 33
RestoDruid = 34
Havoc = 35
Vengeance = 36
Devourer = 40
Devastation = 37
Preservation = 38
Augmentation = 39
Implementations§
Source§impl SpecId
impl SpecId
pub const COUNT: usize = <Self as strum::EnumCount>::COUNT
Sourcepub fn parse_wow_spec_id(wow_id: u32) -> Result<Self, SpecIdParseError>
pub fn parse_wow_spec_id(wow_id: u32) -> Result<Self, SpecIdParseError>
Parse a game specialization ID.
§Errors
Returns an error when the ID is not in the specialization table.
Sourcepub fn parse_toml_key(value: &str) -> Result<Self, SpecIdParseError>
pub fn parse_toml_key(value: &str) -> Result<Self, SpecIdParseError>
Parse a specialization TOML key.
§Errors
Returns an error when the key is not in the specialization table.
Source§impl SpecId
impl SpecId
pub const fn wow_spec_id(self) -> u32
pub const fn from_wow_spec_id(wow_id: u32) -> Option<Self>
pub const fn toml_key(self) -> &'static str
pub fn from_toml_key(value: &str) -> Option<Self>
pub fn from_manifest_slug(slug: &str) -> Option<Self>
pub const fn class(self) -> ClassId
pub const fn primary_resource(self) -> ResourceType
pub const fn is_dps(self) -> bool
pub const fn is_tank(self) -> bool
pub const fn is_healer(self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SpecId
impl<'de> Deserialize<'de> for SpecId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromWasmAbi for SpecIdwhere
Self: DeserializeOwned,
impl FromWasmAbi for SpecIdwhere
Self: DeserializeOwned,
Source§impl IntoEnumIterator for SpecId
impl IntoEnumIterator for SpecId
type Iterator = SpecIdIter
fn iter() -> SpecIdIter ⓘ
Source§impl IntoWasmAbi for &SpecId
impl IntoWasmAbi for &SpecId
Source§impl IntoWasmAbi for SpecId
impl IntoWasmAbi for SpecId
Source§impl OptionFromWasmAbi for SpecIdwhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for SpecIdwhere
Self: DeserializeOwned,
Source§impl OptionIntoWasmAbi for SpecId
impl OptionIntoWasmAbi for SpecId
Source§impl RefFromWasmAbi for SpecIdwhere
Self: DeserializeOwned,
impl RefFromWasmAbi for SpecIdwhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
The Wasm ABI type references to
Self are recovered from.Source§impl Tsify for SpecId
impl Tsify for SpecId
const DECL: &'static str = "export type SpecId = \"Arms\" | \"Fury\" | \"ProtWarrior\" | \"HolyPaladin\" | \"ProtPaladin\" | \"Retribution\" | \"BeastMastery\" | \"Marksmanship\" | \"Survival\" | \"Assassination\" | \"Outlaw\" | \"Subtlety\" | \"Discipline\" | \"HolyPriest\" | \"Shadow\" | \"Blood\" | \"FrostDK\" | \"Unholy\" | \"Elemental\" | \"Enhancement\" | \"RestoShaman\" | \"Arcane\" | \"Fire\" | \"FrostMage\" | \"Affliction\" | \"Demonology\" | \"Destruction\" | \"Brewmaster\" | \"Mistweaver\" | \"Windwalker\" | \"Balance\" | \"Feral\" | \"Guardian\" | \"RestoDruid\" | \"Havoc\" | \"Vengeance\" | \"Devourer\" | \"Devastation\" | \"Preservation\" | \"Augmentation\";"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
Source§impl VectorFromWasmAbi for SpecIdwhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for SpecIdwhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl VectorIntoWasmAbi for SpecId
impl VectorIntoWasmAbi for SpecId
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl WasmDescribeVector for SpecId
impl WasmDescribeVector for SpecId
impl Copy for SpecId
impl Eq for SpecId
impl StructuralPartialEq for SpecId
Auto Trait Implementations§
impl Freeze for SpecId
impl RefUnwindSafe for SpecId
impl Send for SpecId
impl Sync for SpecId
impl Unpin for SpecId
impl UnsafeUnpin for SpecId
impl UnwindSafe for SpecId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of [
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString]. Read more