#[repr(u8)]pub enum ResourceType {
Show 21 variants
Mana = 0,
Rage = 1,
Focus = 2,
Energy = 3,
ComboPoints = 4,
Runes = 5,
RunicPower = 6,
SoulShards = 7,
LunarPower = 8,
HolyPower = 9,
Alternate = 10,
Maelstrom = 11,
Chi = 12,
Insanity = 13,
ArcaneCharges = 16,
Fury = 17,
Pain = 18,
Essence = 19,
AlternateQuest = 23,
AlternateEncounter = 24,
AlternateMount = 25,
}Variants§
Mana = 0
Rage = 1
Focus = 2
Energy = 3
ComboPoints = 4
Runes = 5
RunicPower = 6
SoulShards = 7
LunarPower = 8
HolyPower = 9
Alternate = 10
Maelstrom = 11
Chi = 12
Insanity = 13
ArcaneCharges = 16
Fury = 17
Pain = 18
Essence = 19
AlternateQuest = 23
AlternateEncounter = 24
AlternateMount = 25
Implementations§
Source§impl ResourceType
impl ResourceType
pub const COUNT: usize = <Self as strum::EnumCount>::COUNT
const BASE_MAX_MANA: u32 = 50_000
const BASE_MAX_PERCENTAGE: u32 = 100
const BASE_MAX_COMBO: u32 = 5
const BASE_MAX_RUNES: u32 = 6
const BASE_MAX_ARCANE_CHARGES: u32 = 4
const ENERGY_REGEN_PER_SEC: f32 = 10.0
const FOCUS_REGEN_PER_SEC: f32 = 5.0
const MANA_REGEN_PCT_PER_SEC: f32 = 0.01
pub const fn base_max(self) -> u32
pub const fn has_passive_regen(self) -> bool
pub const fn base_regen_per_sec(self) -> f32
Trait Implementations§
Source§impl Clone for ResourceType
impl Clone for ResourceType
Source§fn clone(&self) -> ResourceType
fn clone(&self) -> ResourceType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceType
impl Debug for ResourceType
Source§impl<'de> Deserialize<'de> for ResourceType
impl<'de> Deserialize<'de> for ResourceType
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 Display for ResourceType
impl Display for ResourceType
Source§impl From<ResourceType> for JsValuewhere
ResourceType: Serialize,
impl From<ResourceType> for JsValuewhere
ResourceType: Serialize,
Source§fn from(value: ResourceType) -> Self
fn from(value: ResourceType) -> Self
Converts to this type from the input type.
Source§impl From<ResourceType> for u8
impl From<ResourceType> for u8
Source§fn from(enum_value: ResourceType) -> Self
fn from(enum_value: ResourceType) -> Self
Converts to this type from the input type.
Source§impl FromStr for ResourceType
impl FromStr for ResourceType
Source§impl FromWasmAbi for ResourceTypewhere
Self: DeserializeOwned,
impl FromWasmAbi for ResourceTypewhere
Self: DeserializeOwned,
Source§impl Hash for ResourceType
impl Hash for ResourceType
Source§impl IntoEnumIterator for ResourceType
impl IntoEnumIterator for ResourceType
type Iterator = ResourceTypeIter
fn iter() -> ResourceTypeIter ⓘ
Source§impl IntoWasmAbi for &ResourceTypewhere
ResourceType: Serialize,
impl IntoWasmAbi for &ResourceTypewhere
ResourceType: Serialize,
Source§impl IntoWasmAbi for ResourceTypewhere
ResourceType: Serialize,
impl IntoWasmAbi for ResourceTypewhere
ResourceType: Serialize,
Source§impl OptionFromWasmAbi for ResourceTypewhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for ResourceTypewhere
Self: DeserializeOwned,
Source§impl OptionIntoWasmAbi for ResourceTypewhere
ResourceType: Serialize,
impl OptionIntoWasmAbi for ResourceTypewhere
ResourceType: Serialize,
Source§impl PartialEq for ResourceType
impl PartialEq for ResourceType
Source§impl RefFromWasmAbi for ResourceTypewhere
Self: DeserializeOwned,
impl RefFromWasmAbi for ResourceTypewhere
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§type Anchor = SelfOwner<ResourceType>
type Anchor = SelfOwner<ResourceType>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl Serialize for ResourceType
impl Serialize for ResourceType
Source§impl TryFrom<&str> for ResourceType
impl TryFrom<&str> for ResourceType
Source§impl TryFrom<u8> for ResourceType
impl TryFrom<u8> for ResourceType
Source§impl TryFromPrimitive for ResourceType
impl TryFromPrimitive for ResourceType
Source§impl Tsify for ResourceType
impl Tsify for ResourceType
const DECL: &'static str = "export type ResourceType = \"Mana\" | \"Rage\" | \"Focus\" | \"Energy\" | \"ComboPoints\" | \"Runes\" | \"RunicPower\" | \"SoulShards\" | \"LunarPower\" | \"HolyPower\" | \"Alternate\" | \"Maelstrom\" | \"Chi\" | \"Insanity\" | \"ArcaneCharges\" | \"Fury\" | \"Pain\" | \"Essence\" | \"AlternateQuest\" | \"AlternateEncounter\" | \"AlternateMount\";"
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 ResourceTypewhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for ResourceTypewhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl VectorIntoWasmAbi for ResourceTypewhere
ResourceType: Serialize,
impl VectorIntoWasmAbi for ResourceTypewhere
ResourceType: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl WasmDescribe for ResourceType
impl WasmDescribe for ResourceType
Source§impl WasmDescribeVector for ResourceType
impl WasmDescribeVector for ResourceType
impl Copy for ResourceType
impl Eq for ResourceType
impl StructuralPartialEq for ResourceType
Auto Trait Implementations§
impl Freeze for ResourceType
impl RefUnwindSafe for ResourceType
impl Send for ResourceType
impl Sync for ResourceType
impl Unpin for ResourceType
impl UnsafeUnpin for ResourceType
impl UnwindSafe for ResourceType
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