#[repr(u8)]pub enum GearSlot {
Show 18 variants
Head = 1,
Neck = 2,
Shoulders = 3,
Shirt = 4,
Chest = 5,
Waist = 6,
Legs = 7,
Feet = 8,
Wrists = 9,
Hands = 10,
Finger1 = 11,
Finger2 = 12,
Trinket1 = 13,
Trinket2 = 14,
Back = 16,
Tabard = 19,
MainHand = 21,
OffHand = 22,
}Expand description
Equipment slot; repr(u8) matches WoW inventory_type IDs.
Variants§
Head = 1
Neck = 2
Shoulders = 3
Shirt = 4
Chest = 5
Waist = 6
Legs = 7
Feet = 8
Wrists = 9
Hands = 10
Finger1 = 11
Finger2 = 12
Trinket1 = 13
Trinket2 = 14
Back = 16
Tabard = 19
MainHand = 21
OffHand = 22
Implementations§
Source§impl GearSlot
impl GearSlot
pub const fn slug(&self) -> &'static str
Sourcepub const fn use_alias(&self) -> Option<&'static str>
pub const fn use_alias(&self) -> Option<&'static str>
Rotation on-use action key for this slot (e.g. trinket_1_use), if it has one.
Sourcepub fn from_slug(s: &str) -> Option<GearSlot>
pub fn from_slug(s: &str) -> Option<GearSlot>
Parse from a slug; accepts singular aliases (shoulder/wrist, cloak, trinket_1).
pub fn trinket_from_index(slot: u8) -> Option<GearSlot>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GearSlot
impl<'de> Deserialize<'de> for GearSlot
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 Tsify for GearSlot
impl Tsify for GearSlot
const DECL: &'static str = "/**\n * Equipment slot; `repr(u8)` matches `WoW` `inventory_type` IDs.\n */\nexport type GearSlot = \"head\" | \"neck\" | \"shoulders\" | \"shirt\" | \"chest\" | \"waist\" | \"legs\" | \"feet\" | \"wrists\" | \"hands\" | \"finger1\" | \"finger2\" | \"trinket1\" | \"trinket2\" | \"back\" | \"tabard\" | \"main_hand\" | \"off_hand\";"
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>
impl Copy for GearSlot
impl Eq for GearSlot
impl StructuralPartialEq for GearSlot
Auto Trait Implementations§
impl Freeze for GearSlot
impl RefUnwindSafe for GearSlot
impl Send for GearSlot
impl Sync for GearSlot
impl Unpin for GearSlot
impl UnsafeUnpin for GearSlot
impl UnwindSafe for GearSlot
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,
§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