pub struct SpecResolver {
pub name: String,
resource_type_str: Option<String>,
secondary_resource_type_str: Option<String>,
resources: FastMap<String, ResourceType>,
spells: FastMap<String, SpellIdx>,
auras: FastMap<String, AuraIdx>,
dots: FastMap<String, AuraIdx>,
talents: FastMap<String, TalentInfo>,
charged_cooldowns: FastSet<String>,
spell_aura_policies: Vec<SpellAuraPolicy>,
}Expand description
Maps rotation-JSON string names (spells, auras, talents, resources) to their resolved numeric IDs for a single spec.
Fields§
§name: String§resource_type_str: Option<String>§secondary_resource_type_str: Option<String>§resources: FastMap<String, ResourceType>§spells: FastMap<String, SpellIdx>§auras: FastMap<String, AuraIdx>§dots: FastMap<String, AuraIdx>§talents: FastMap<String, TalentInfo>§charged_cooldowns: FastSet<String>§spell_aura_policies: Vec<SpellAuraPolicy>Implementations§
Source§impl SpecResolver
impl SpecResolver
pub fn spell_gating( self, spell: SpellIdx, aura: AuraIdx, on: AuraOn, min_stacks: u8, ) -> Self
pub fn spell_cost_bypass( self, spell: SpellIdx, aura: AuraIdx, on: AuraOn, ) -> Self
pub fn spell_cooldown_bypass( self, spell: SpellIdx, aura: AuraIdx, on: AuraOn, ) -> Self
pub fn spell_override( self, spell: SpellIdx, replacement: SpellIdx, aura: AuraIdx, on: AuraOn, shares_base_cooldown: bool, ) -> Self
pub fn spell_aura_policies(&self) -> &[SpellAuraPolicy]
Source§impl SpecResolver
impl SpecResolver
pub fn new(name: impl Into<String>) -> Self
pub fn resource(self, resource_name: impl Into<String>) -> Self
pub fn secondary_resource(self, resource_name: impl Into<String>) -> Self
pub fn resource_type( self, name: impl Into<String>, res_type: ResourceType, ) -> Self
pub fn spell(self, name: impl Into<String>, id: u32) -> Self
pub fn aura(self, name: impl Into<String>, id: u32) -> Self
Sourcepub fn dot(self, name: impl Into<String>, id: u32) -> Self
pub fn dot(self, name: impl Into<String>, id: u32) -> Self
Registers a damage-over-time aura; it lives only in the dots map and aura accessors fall back to it.
pub fn charged_cooldown(self, name: impl Into<String>) -> Self
pub fn talent(self, name: impl Into<String>, enabled: bool) -> Self
pub fn talent_ranked( self, name: impl Into<String>, rank: i32, max_rank: i32, ) -> Self
Sourcepub fn resolve_spell(&self, name: &str) -> Result<SpellIdx>
pub fn resolve_spell(&self, name: &str) -> Result<SpellIdx>
Sourcepub fn resolve_aura(&self, name: &str) -> Result<AuraIdx>
pub fn resolve_aura(&self, name: &str) -> Result<AuraIdx>
Resolves a named aura.
§Errors
Returns an error when the name is not registered as an aura or damage-over-time effect.
Sourcepub fn resolve_dot(&self, name: &str) -> Result<AuraIdx>
pub fn resolve_dot(&self, name: &str) -> Result<AuraIdx>
Sourcepub fn resolve_talent(&self, name: &str) -> Result<bool>
pub fn resolve_talent(&self, name: &str) -> Result<bool>
Resolves whether a named talent is active.
§Errors
Returns an error when the talent name is not registered.
Sourcepub fn resolve_talent_info(&self, name: &str) -> Result<TalentInfo>
pub fn resolve_talent_info(&self, name: &str) -> Result<TalentInfo>
Resolves rank metadata for a named talent.
§Errors
Returns an error when the talent name is not registered.
pub fn is_charged(&self, name: &str) -> bool
pub fn primary_resource(&self) -> Option<&str>
pub fn primary_resource_type(&self) -> Option<ResourceType>
pub fn secondary_resource_type(&self) -> Option<ResourceType>
Sourcepub fn resolve_resource(&self, name: &str) -> Result<ResourceType>
pub fn resolve_resource(&self, name: &str) -> Result<ResourceType>
pub fn has_spell(&self, name: &str) -> bool
pub fn has_aura(&self, name: &str) -> bool
pub fn has_dot(&self, name: &str) -> bool
pub fn has_talent(&self, name: &str) -> bool
pub fn knows_talent(&self, name: &str) -> bool
pub fn registered_resource_types(&self) -> FastSet<ResourceType>
Trait Implementations§
Source§impl Clone for SpecResolver
impl Clone for SpecResolver
Source§fn clone(&self) -> SpecResolver
fn clone(&self) -> SpecResolver
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 moreAuto Trait Implementations§
impl Freeze for SpecResolver
impl RefUnwindSafe for SpecResolver
impl Send for SpecResolver
impl Sync for SpecResolver
impl Unpin for SpecResolver
impl UnsafeUnpin for SpecResolver
impl UnwindSafe for SpecResolver
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> 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