pub struct EnemyStatResolver<'a> {
resolver: &'a DynDataResolver<'a>,
}Expand description
Application-layer enemy-stat resolution service over one data backend.
Fields§
§resolver: &'a DynDataResolver<'a>Implementations§
Source§impl<'a> EnemyStatResolver<'a>
impl<'a> EnemyStatResolver<'a>
pub const fn new(resolver: &'a DynDataResolver<'a>) -> Self
Sourcepub async fn resolve(
&self,
enemy: &EnemyDefinition,
) -> Result<ResolvedEnemyStats, EnemyStatResolutionError>
pub async fn resolve( &self, enemy: &EnemyDefinition, ) -> Result<ResolvedEnemyStats, EnemyStatResolutionError>
Resolve every component required for combat construction.
Sourcepub async fn inspect(
&self,
enemy: &EnemyDefinition,
) -> Result<EnemyStatInspection, EnemyStatResolutionError>
pub async fn inspect( &self, enemy: &EnemyDefinition, ) -> Result<EnemyStatInspection, EnemyStatResolutionError>
Inspect all components, returning a typed partial resolution.
async fn resolve_identity( &self, input: &EnemyIdentityInput, provenance: &mut Vec<EnemyStatProvenanceStep>, ) -> Result<ResolvedEnemyIdentity, EnemyStatResolutionError>
Sourceasync fn creature_tuning(
&self,
npc_id: u32,
provenance: &mut Vec<EnemyStatProvenanceStep>,
) -> Result<Option<ResolvedCreatureTuning>, EnemyStatResolutionError>
async fn creature_tuning( &self, npc_id: u32, provenance: &mut Vec<EnemyStatProvenanceStep>, ) -> Result<Option<ResolvedCreatureTuning>, EnemyStatResolutionError>
Record the creature-to-tuning join (J9) as metadata only when a single variant exists (A3).
Sourceasync fn base_stat_row(
&self,
enemy: &EnemyDefinition,
) -> Result<BaseStatRow, EnemyStatResolutionError>
async fn base_stat_row( &self, enemy: &EnemyDefinition, ) -> Result<BaseStatRow, EnemyStatResolutionError>
Base ExpectedStat row: Generic uses exact (expansion_id, level) (J11), else (-2, level).
async fn max_health( &self, enemy: &EnemyDefinition, base: &BaseStatRow, provenance: &mut Vec<EnemyStatProvenanceStep>, ) -> Result<f64, EnemyStatResolutionError>
async fn armor_constant( &self, enemy: &EnemyDefinition, base: &BaseStatRow, provenance: &mut Vec<EnemyStatProvenanceStep>, ) -> Result<f64, EnemyStatResolutionError>
Sourceasync fn mythic_plus_armor_constant(
&self,
season_id: u32,
base: &BaseStatRow,
provenance: &mut Vec<EnemyStatProvenanceStep>,
) -> Result<f64, EnemyStatResolutionError>
async fn mythic_plus_armor_constant( &self, season_id: u32, base: &BaseStatRow, provenance: &mut Vec<EnemyStatProvenanceStep>, ) -> Result<f64, EnemyStatResolutionError>
Mythic+ armor constant (J3): base value times every season-selected ExpectedStatMod (J5/J6); empty set is missing data.
Sourceasync fn unproven_inference_error(
&self,
field: EnemyStatField,
enemy: &EnemyDefinition,
) -> Result<EnemyStatError, EnemyStatResolutionError>
async fn unproven_inference_error( &self, field: EnemyStatField, enemy: &EnemyDefinition, ) -> Result<EnemyStatError, EnemyStatResolutionError>
Typed error for an unproven non-generic inference; the creature walk only reports candidate rows (A1-A6).
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for EnemyStatResolver<'a>
impl<'a> !RefUnwindSafe for EnemyStatResolver<'a>
impl<'a> Send for EnemyStatResolver<'a>
impl<'a> Sync for EnemyStatResolver<'a>
impl<'a> Unpin for EnemyStatResolver<'a>
impl<'a> UnsafeUnpin for EnemyStatResolver<'a>
impl<'a> !UnwindSafe for EnemyStatResolver<'a>
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