pub struct SpecCatalog {
spells_by_name: FastMap<String, SpellIdx>,
spells_by_id: IntMap<u32, SpellIdx>,
auras_by_name: FastMap<String, AuraIdx>,
dots_by_name: FastMap<String, AuraIdx>,
talents_by_name: FastMap<String, TalentInfo>,
charged_cooldowns: FastMap<String, SpellIdx>,
cooldowns_by_name: FastMap<String, SpellIdx>,
primary_resource: Option<String>,
secondary_resource: Option<String>,
}Expand description
Display names are converted to snake_case keys for rotation compilation.
Fields§
§spells_by_name: FastMap<String, SpellIdx>§spells_by_id: IntMap<u32, SpellIdx>§auras_by_name: FastMap<String, AuraIdx>§dots_by_name: FastMap<String, AuraIdx>§talents_by_name: FastMap<String, TalentInfo>§charged_cooldowns: FastMap<String, SpellIdx>§cooldowns_by_name: FastMap<String, SpellIdx>§primary_resource: Option<String>§secondary_resource: Option<String>Implementations§
Source§impl SpecCatalog
impl SpecCatalog
Sourcepub fn new(
spell_ids: &FastMap<String, u32>,
aura_ids: &FastMap<String, u32>,
hints: &CatalogHints,
) -> Self
pub fn new( spell_ids: &FastMap<String, u32>, aura_ids: &FastMap<String, u32>, hints: &CatalogHints, ) -> Self
Richer metadata (cooldowns, charges, DoTs, talents) is supplied via CatalogHints.
pub fn spell_by_name(&self, name: &str) -> Option<SpellIdx>
pub fn spell_by_id(&self, id: u32) -> Option<SpellIdx>
pub fn has_spell(&self, name: &str) -> bool
pub fn aura_by_name(&self, name: &str) -> Option<AuraIdx>
pub fn has_aura(&self, name: &str) -> bool
pub fn dot_by_name(&self, name: &str) -> Option<AuraIdx>
pub fn has_dot(&self, name: &str) -> bool
pub fn talent(&self, name: &str) -> Option<TalentInfo>
pub fn has_talent(&self, name: &str) -> bool
pub fn knows_talent(&self, name: &str) -> bool
pub fn set_talent(&mut self, name: &str, rank: TalentInfo)
pub fn is_charged(&self, name: &str) -> bool
pub fn cooldown_by_name(&self, name: &str) -> Option<SpellIdx>
pub fn primary_resource(&self) -> Option<&str>
pub fn register_secondary_resource(&mut self, name: &str)
pub fn secondary_resource(&self) -> Option<&str>
pub fn to_resolver(&self, name: &str) -> SpecResolver
pub(crate) fn spells(&self) -> impl Iterator<Item = (&str, SpellIdx)>
pub(crate) fn auras(&self) -> impl Iterator<Item = (&str, AuraIdx)>
pub(crate) fn dots(&self) -> impl Iterator<Item = (&str, AuraIdx)>
pub(crate) fn talents(&self) -> impl Iterator<Item = (&str, TalentInfo)>
pub(crate) fn charged_cooldowns(&self) -> impl Iterator<Item = &str>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpecCatalog
impl RefUnwindSafe for SpecCatalog
impl Send for SpecCatalog
impl Sync for SpecCatalog
impl Unpin for SpecCatalog
impl UnsafeUnpin for SpecCatalog
impl UnwindSafe for SpecCatalog
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more