Skip to main content

DataResolver

Trait DataResolver 

Source
pub trait DataResolver: ResolverSyncBound + Send {
Show 28 methods // Required methods fn get_spell( &self, spell_id: SpellId, ) -> impl Future<Output = Result<SpellDataFlat, ResolverError>> + Send; fn get_spell_effect( &self, spell_id: SpellId, effect_index: u8, ) -> impl Future<Output = Result<SpellEffect, ResolverError>> + Send; fn get_spell_effects( &self, spell_id: SpellId, ) -> impl Future<Output = Result<Vec<SpellEffect>, ResolverError>> + Send; fn get_item( &self, item_id: i32, ) -> impl Future<Output = Result<ItemDataFlat, ResolverError>> + Send; fn get_scaling_data( &self, ) -> impl Future<Output = Result<Arc<ItemScalingData>, ResolverError>> + Send; fn get_power_types( &self, ) -> impl Future<Output = Result<Vec<PowerTypeFlat>, ResolverError>> + Send; fn get_spec( &self, spec_id: i32, ) -> impl Future<Output = Result<SpecDataFlat, ResolverError>> + Send; fn get_trait_tree( &self, spec_id: i32, ) -> impl Future<Output = Result<TraitTreeFlat, ResolverError>> + Send; fn get_rotation_script( &self, rotation_id: &str, ) -> impl Future<Output = Result<String, ResolverError>> + Send; fn get_spell_overrides( &self, spec_id: i32, ) -> impl Future<Output = Result<Vec<(SpellId, SpellId)>, ResolverError>> + Send; fn get_specialization_spells( &self, spec_id: i32, ) -> impl Future<Output = Result<Vec<SpellId>, ResolverError>> + Send; fn get_racial_spells( &self, race_id: i32, class_id: i32, ) -> impl Future<Output = Result<Vec<SpellId>, ResolverError>> + Send; fn get_expected_stats( &self, expansion_id: i32, lvl: i32, ) -> impl Future<Output = Result<ExpectedStatFlat, ResolverError>> + Send; fn get_item_damage_scaling( &self, item_level: i32, weapon_type: &str, ) -> impl Future<Output = Result<ItemDamageScalingFlat, ResolverError>> + Send; fn get_enchantment( &self, enchantment_id: i32, ) -> impl Future<Output = Result<EnchantmentRow, ResolverError>> + Send; // Provided methods fn get_spells( &self, spell_ids: &[SpellId], ) -> impl Future<Output = Result<Vec<SpellDataFlat>, ResolverError>> + Send { ... } fn get_expansion_trait_tree( &self, expansion_id: i32, system: &str, ) -> impl Future<Output = Result<ExpansionTraitTreeFlat, ResolverError>> + Send { ... } fn search_spells( &self, query: &str, limit: u32, ) -> impl Future<Output = Result<Vec<SpellSearchResult>, ResolverError>> + Send { ... } fn find_consumable_items( &self, name_token: &str, subclass: i32, ) -> impl Future<Output = Result<Vec<ItemDataFlat>, ResolverError>> + Send { ... } fn find_permanent_enchant( &self, query: &PermanentEnchantQuery, ) -> impl Future<Output = Result<Option<PermanentEnchantFlat>, ResolverError>> + Send { ... } fn get_creature( &self, creature_id: i32, ) -> impl Future<Output = Result<CreatureFlat, ResolverError>> + Send { ... } fn get_creature_difficulties( &self, creature_id: i32, ) -> impl Future<Output = Result<Vec<CreatureDifficultyFlat>, ResolverError>> + Send { ... } fn get_content_tuning( &self, content_tuning_id: i32, ) -> impl Future<Output = Result<ContentTuningFlat, ResolverError>> + Send { ... } fn get_content_tuning_x_difficulty( &self, content_tuning_id: i32, ) -> impl Future<Output = Result<Vec<ContentTuningXDifficultyFlat>, ResolverError>> + Send { ... } fn get_content_tuning_x_expected( &self, content_tuning_id: i32, ) -> impl Future<Output = Result<Vec<ContentTuningXExpectedFlat>, ResolverError>> + Send { ... } fn get_expected_stat_mod( &self, expected_stat_mod_id: i32, ) -> impl Future<Output = Result<ExpectedStatModFlat, ResolverError>> + Send { ... } fn get_challenge_mode_health( &self, keystone_level: i32, ) -> impl Future<Output = Result<ChallengeModeHealthFlat, ResolverError>> + Send { ... } fn decode_traits( &self, spec_id: i32, trait_string: &str, ) -> impl Future<Output = Result<TraitTreeWithSelections, ResolverError>> + Send { ... }
}
Expand description

Unified data resolver trait (DynDataResolver restores dyn polymorphism); method futures are Send but not Sync.

Required Methods§

Source

fn get_spell( &self, spell_id: SpellId, ) -> impl Future<Output = Result<SpellDataFlat, ResolverError>> + Send

Source

fn get_spell_effect( &self, spell_id: SpellId, effect_index: u8, ) -> impl Future<Output = Result<SpellEffect, ResolverError>> + Send

effect_index is 1-based (author-facing).

Source

fn get_spell_effects( &self, spell_id: SpellId, ) -> impl Future<Output = Result<Vec<SpellEffect>, ResolverError>> + Send

Source

fn get_item( &self, item_id: i32, ) -> impl Future<Output = Result<ItemDataFlat, ResolverError>> + Send

Source

fn get_scaling_data( &self, ) -> impl Future<Output = Result<Arc<ItemScalingData>, ResolverError>> + Send

Source

fn get_power_types( &self, ) -> impl Future<Output = Result<Vec<PowerTypeFlat>, ResolverError>> + Send

Source

fn get_spec( &self, spec_id: i32, ) -> impl Future<Output = Result<SpecDataFlat, ResolverError>> + Send

Source

fn get_trait_tree( &self, spec_id: i32, ) -> impl Future<Output = Result<TraitTreeFlat, ResolverError>> + Send

Source

fn get_rotation_script( &self, rotation_id: &str, ) -> impl Future<Output = Result<String, ResolverError>> + Send

Source

fn get_spell_overrides( &self, spec_id: i32, ) -> impl Future<Output = Result<Vec<(SpellId, SpellId)>, ResolverError>> + Send

Required for resolver parity: a backend with no override table returns Ok(vec![]).

Source

fn get_specialization_spells( &self, spec_id: i32, ) -> impl Future<Output = Result<Vec<SpellId>, ResolverError>> + Send

Every spell id assigned to the spec in SpecializationSpells; a backend with no table returns Ok(vec![]).

Source

fn get_racial_spells( &self, race_id: i32, class_id: i32, ) -> impl Future<Output = Result<Vec<SpellId>, ResolverError>> + Send

Every racial ability the race grants the class; a backend with no table returns Ok(vec![]).

race_id is ChrRaces.ID and class_id is ChrClasses.ID.

Source

fn get_expected_stats( &self, expansion_id: i32, lvl: i32, ) -> impl Future<Output = Result<ExpectedStatFlat, ResolverError>> + Send

Required for resolver parity: return ExpectedStatsNotFound when a backend cannot source it.

Source

fn get_item_damage_scaling( &self, item_level: i32, weapon_type: &str, ) -> impl Future<Output = Result<ItemDamageScalingFlat, ResolverError>> + Send

Required for resolver parity: return ItemDamageScalingNotFound when a backend cannot source it.

Source

fn get_enchantment( &self, enchantment_id: i32, ) -> impl Future<Output = Result<EnchantmentRow, ResolverError>> + Send

Required for resolver parity: return EnchantmentNotFound when a backend cannot source it.

Provided Methods§

Source

fn get_spells( &self, spell_ids: &[SpellId], ) -> impl Future<Output = Result<Vec<SpellDataFlat>, ResolverError>> + Send

Source

fn get_expansion_trait_tree( &self, expansion_id: i32, system: &str, ) -> impl Future<Output = Result<ExpansionTraitTreeFlat, ResolverError>> + Send

Fetch a class-agnostic expansion progression tree, such as Midnight’s Omnium Folio.

Source

fn search_spells( &self, query: &str, limit: u32, ) -> impl Future<Output = Result<Vec<SpellSearchResult>, ResolverError>> + Send

Defaults to Unsupported; a backend with no search index fails loud rather than returning empty.

Source

fn find_consumable_items( &self, name_token: &str, subclass: i32, ) -> impl Future<Output = Result<Vec<ItemDataFlat>, ResolverError>> + Send

Finds consumable items whose tokenized names contain name_token.

Source

fn find_permanent_enchant( &self, query: &PermanentEnchantQuery, ) -> impl Future<Output = Result<Option<PermanentEnchantFlat>, ResolverError>> + Send

Resolves a named permanent enchant through the profession-derived SimC index.

Source

fn get_creature( &self, creature_id: i32, ) -> impl Future<Output = Result<CreatureFlat, ResolverError>> + Send

Creature identity row (Creature table) by NPC ID; defaults to Unsupported until a backend implements enemy resolution.

Source

fn get_creature_difficulties( &self, creature_id: i32, ) -> impl Future<Output = Result<Vec<CreatureDifficultyFlat>, ResolverError>> + Send

Every CreatureDifficulty variant for a creature; defaults to Unsupported until a backend implements enemy resolution.

Source

fn get_content_tuning( &self, content_tuning_id: i32, ) -> impl Future<Output = Result<ContentTuningFlat, ResolverError>> + Send

ContentTuning row by ID; defaults to Unsupported until a backend implements enemy resolution.

Source

fn get_content_tuning_x_difficulty( &self, content_tuning_id: i32, ) -> impl Future<Output = Result<Vec<ContentTuningXDifficultyFlat>, ResolverError>> + Send

Every ContentTuningXDifficulty mapping for a content tuning; defaults to Unsupported until a backend implements enemy resolution.

Source

fn get_content_tuning_x_expected( &self, content_tuning_id: i32, ) -> impl Future<Output = Result<Vec<ContentTuningXExpectedFlat>, ResolverError>> + Send

Every ContentTuningXExpected mapping; row selection stays in the application layer.

Source

fn get_expected_stat_mod( &self, expected_stat_mod_id: i32, ) -> impl Future<Output = Result<ExpectedStatModFlat, ResolverError>> + Send

ExpectedStatMod multiplier row by ID.

Source

fn get_challenge_mode_health( &self, keystone_level: i32, ) -> impl Future<Output = Result<ChallengeModeHealthFlat, ResolverError>> + Send

ChallengeModeHealth GameTable scalar by keystone level.

Source

fn decode_traits( &self, spec_id: i32, trait_string: &str, ) -> impl Future<Output = Result<TraitTreeWithSelections, ResolverError>> + Send

Decode a loadout string against this spec’s tree into a raw selected tree; talent-tree interpretation is the caller’s job.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'dynosaur_struct> DataResolver for Box<DynDataResolver<'dynosaur_struct>>
where Self: ResolverSyncBound + Send,

Source§

fn get_spell( &self, spell_id: SpellId, ) -> impl Future<Output = Result<SpellDataFlat, ResolverError>> + Send

Source§

fn get_spells( &self, spell_ids: &[SpellId], ) -> impl Future<Output = Result<Vec<SpellDataFlat>, ResolverError>> + Send

Source§

fn get_spell_effect( &self, spell_id: SpellId, effect_index: u8, ) -> impl Future<Output = Result<SpellEffect, ResolverError>> + Send

Source§

fn get_spell_effects( &self, spell_id: SpellId, ) -> impl Future<Output = Result<Vec<SpellEffect>, ResolverError>> + Send

Source§

fn get_item( &self, item_id: i32, ) -> impl Future<Output = Result<ItemDataFlat, ResolverError>> + Send

Source§

fn get_scaling_data( &self, ) -> impl Future<Output = Result<Arc<ItemScalingData>, ResolverError>> + Send

Source§

fn get_power_types( &self, ) -> impl Future<Output = Result<Vec<PowerTypeFlat>, ResolverError>> + Send

Source§

fn get_spec( &self, spec_id: i32, ) -> impl Future<Output = Result<SpecDataFlat, ResolverError>> + Send

Source§

fn get_trait_tree( &self, spec_id: i32, ) -> impl Future<Output = Result<TraitTreeFlat, ResolverError>> + Send

Source§

fn get_expansion_trait_tree( &self, expansion_id: i32, system: &str, ) -> impl Future<Output = Result<ExpansionTraitTreeFlat, ResolverError>> + Send

Source§

fn get_rotation_script( &self, rotation_id: &str, ) -> impl Future<Output = Result<String, ResolverError>> + Send

Source§

fn get_spell_overrides( &self, spec_id: i32, ) -> impl Future<Output = Result<Vec<(SpellId, SpellId)>, ResolverError>> + Send

Source§

fn get_specialization_spells( &self, spec_id: i32, ) -> impl Future<Output = Result<Vec<SpellId>, ResolverError>> + Send

Source§

fn get_racial_spells( &self, race_id: i32, class_id: i32, ) -> impl Future<Output = Result<Vec<SpellId>, ResolverError>> + Send

Source§

fn get_expected_stats( &self, expansion_id: i32, lvl: i32, ) -> impl Future<Output = Result<ExpectedStatFlat, ResolverError>> + Send

Source§

fn get_item_damage_scaling( &self, item_level: i32, weapon_type: &str, ) -> impl Future<Output = Result<ItemDamageScalingFlat, ResolverError>> + Send

Source§

fn search_spells( &self, query: &str, limit: u32, ) -> impl Future<Output = Result<Vec<SpellSearchResult>, ResolverError>> + Send

Source§

fn find_consumable_items( &self, name_token: &str, subclass: i32, ) -> impl Future<Output = Result<Vec<ItemDataFlat>, ResolverError>> + Send

Source§

fn get_enchantment( &self, enchantment_id: i32, ) -> impl Future<Output = Result<EnchantmentRow, ResolverError>> + Send

Source§

fn find_permanent_enchant( &self, query: &PermanentEnchantQuery, ) -> impl Future<Output = Result<Option<PermanentEnchantFlat>, ResolverError>> + Send

Source§

fn get_creature( &self, creature_id: i32, ) -> impl Future<Output = Result<CreatureFlat, ResolverError>> + Send

Source§

fn get_creature_difficulties( &self, creature_id: i32, ) -> impl Future<Output = Result<Vec<CreatureDifficultyFlat>, ResolverError>> + Send

Source§

fn get_content_tuning( &self, content_tuning_id: i32, ) -> impl Future<Output = Result<ContentTuningFlat, ResolverError>> + Send

Source§

fn get_content_tuning_x_difficulty( &self, content_tuning_id: i32, ) -> impl Future<Output = Result<Vec<ContentTuningXDifficultyFlat>, ResolverError>> + Send

Source§

fn get_content_tuning_x_expected( &self, content_tuning_id: i32, ) -> impl Future<Output = Result<Vec<ContentTuningXExpectedFlat>, ResolverError>> + Send

Source§

fn get_expected_stat_mod( &self, expected_stat_mod_id: i32, ) -> impl Future<Output = Result<ExpectedStatModFlat, ResolverError>> + Send

Source§

fn get_challenge_mode_health( &self, keystone_level: i32, ) -> impl Future<Output = Result<ChallengeModeHealthFlat, ResolverError>> + Send

Source§

fn decode_traits( &self, spec_id: i32, trait_string: &str, ) -> impl Future<Output = Result<TraitTreeWithSelections, ResolverError>> + Send

Implementors§

Source§

impl<'dynosaur_struct> DataResolver for &DynDataResolver<'dynosaur_struct>
where Self: ResolverSyncBound + Send,

Source§

impl<'dynosaur_struct> DataResolver for &mut DynDataResolver<'dynosaur_struct>
where Self: ResolverSyncBound + Send,

Source§

impl<'dynosaur_struct> DataResolver for DynDataResolver<'dynosaur_struct>