Skip to main content

Crate wowlab_engine_ports

Crate wowlab_engine_ports 

Source
Expand description

Stable contracts between the simulation core and its adapters.

use wowlab_engine_ports::SpellId;
use wowlab_types::sim::SpellIdx;

let runtime_id = SpellIdx::from_raw(42);
let database_id = SpellId::try_from(runtime_id)?;
assert_eq!(database_id.as_i32(), 42);

Modulesยง

combat_stats ๐Ÿ”’
content_catalog ๐Ÿ”’
Link-time catalog for generated engine content.
decision_trace ๐Ÿ”’
Decision-trace port: typed channel from the rotation engine to consumers.
encounter ๐Ÿ”’
Data-resolved encounter proof consumed by combat construction.
error ๐Ÿ”’
game_bugs ๐Ÿ”’
Central registry of modeled live-game bugs.
progress ๐Ÿ”’
request ๐Ÿ”’
resolver ๐Ÿ”’
result ๐Ÿ”’
sim_state ๐Ÿ”’
spatial ๐Ÿ”’
Narrow spatial-query boundary used by combat targeting.
spec_handler ๐Ÿ”’
spec_metadata ๐Ÿ”’
Static spec declarations emitted from composed manifests.
spec_registry ๐Ÿ”’
spec_state ๐Ÿ”’
Opaque per-spec configuration and resettable runtime-state extension points.
test_support
types ๐Ÿ”’
Spell-ID polarity newtypes for the engine-ports crate boundary.

Macrosยง

define_game_bug
Declare a modeled live-game bug and register it with inventory.
test_spec_handler
Supplies standard no-op SpecHandler methods for test doubles.

Structsยง

ActionEvaluation
Per-action evaluation outcome.
AuraEventRef
Aura identity and optional enemy target delivered to aura lifecycle handlers.
BugSettings
Raw bug-toggle input parsed from sim-config settings, unvalidated.
BugToggles
Resolved per-run bug toggles consulted by combat code.
CastLatency
Deterministic mean input latency used by the cast scheduler.
ChunkAssignment
One chunk assignment from the sentinel/coordinator.
ChunkReport
Per-chunk simulation output.
CombatStats
Primary and secondary combat stats; secondary/tertiary stats are percent points (25.0 == 25%), not fractions.
ConeQuery
Directed cone query on one spatial layer.
ConsumableFlags
Raid/consumable buffs toggled on for a sim run.
ContentCatalog
Deterministic engine-content catalog injected through one link-time registration.
ContentCatalogError
Invalid or missing engine-content catalog data.
Decision
One decision recorded for a single evaluate() call.
DecisionTrace
Full set of decisions captured during a single evaluate() call.
DecisionTraceTarget
Cloneable trace destination with shared ownership hidden at the port boundary.
DeclaredPassiveEffectOverride
The replacement value one passive effect really applies at, as register_passive_effect_override.
DeclaredServerProcEntry
One manifest-authored server SpellProcEntry overlay.
DeclaredSpecMetadata
Complete static metadata declared by one composed spec manifest.
DeclaredSpecMetadataError
Invalid static metadata supplied to a spec descriptor.
DynDataResolver
EnchantmentEffect
One effect slot on an enchantment. effect_type == 3 means trigger spell.
EnchantmentRow
Resolved enchantment row from game.enchantments.
EncounterConstructionError
Failures while turning an authored encounter into combat-ready data.
EngineConstructionError
Typed engine-construction failure with its concrete lower-layer source.
EngineError
Engine error categories.
EquippedItem
One equipped item carried into handler construction: resolved ilvl/quality (for item-budget-scaled buff magnitudes) plus its DBC use/equip effects.
ExternalBuffConfig
GameBug
One deliberately modeled live-game behavior that diverges from spell data.
HandlerParams
Named parameters for building a spec handler.
HeroTalentTreeDesc
Static description of one hero talent tree.
NegativeIdError
Returned when converting a negative SpellId into a SpellIdx.
NoopProgress
No-op progress sink.
Paperdoll
Character sheet snapshot returned by SpecHandler::paperdoll.
PaperdollLoadout
Loadout-derived fields in a character-sheet snapshot.
PermanentEnchantQuery
Exact permanent-enchant lookup coordinates used by SimC profile decoding.
ProgressDone
Called when the chunk finishes.
ProgressStart
Called at sim start with job metadata.
ProgressTick
Called periodically from the sim loop.
PullLifecycleGeneration
Pull-local encounter generation (pull epoch plus lifecycle epoch) so prior events cannot match a newly active actor with the same identity.
PullScope
Pull identity and activation epoch shared by encounter lifecycle events.
RadiusQuery
Centered radius query on one spatial layer.
RaidEventConfig
ResolveDependencies
One authored selector and the additional spell IDs it requires during resolution.
ResolvedEncounter
Validated, resolver-backed encounter accepted by the combat runtime.
ResolvedEnemyCombatStats
Resolver-backed combat stats required to construct one enemy actor.
ResolvedEnemyEncounter
Resolver-backed static stats and authored runtime metadata for one enemy.
ResolvedEnemyIdentityMetadata
Resolver-backed identity metadata for one enemy.
ResolverError
Resolver failure with stable, situation-oriented construction and inspection APIs.
SimContext
Simulation state and telemetry sink passed to spec handler callbacks.
SimRunError
Failure while driving one simulation iteration.
SimState
Runtime state container for one simulation iteration.
SpatialActor
Dynamic actor point consumed by an index implementation.
SpatialEnvelope
Axis-aligned broad-phase query envelope in world yards.
SpatialQueryError
Typed spatial-index maintenance failure.
SpecDescriptor
Per-spec registration record held by the engine-content catalog.
SpecRuntimeError
Fatal typed failure raised by a spec handler while processing one simulation event.
SpellId
Database-polarity (i32) spell identifier matching PostgREST int4 columns.
SpellIdConversionError
Returned when a runtime SpellIdx exceeds the database int4 range.
SpellSearchResult
Lightweight search result for spell lookups.
TalentEffectOverride
Rank-specific adjustment for one effect on a selected talent spell.
TalentSelection
One talent picked from a decoded loadout.
TimedEventSchedule
VecSink
In-memory sink used by tests and the WASM bridge.
WeaponEnchantProc
Resolved TWW weapon-enchant proc ready for post-build registration.

Enumsยง

DeathEventScope
Scheduling scope for the shared target-aware death event.
EncounterDespawnKind
Why a derived encounter despawn is being processed.
EncounterTerminationReason
The policy condition that ended an encounter iteration.
EnemyDespawnOutcome
Typed result of requesting the combat layer to despawn one exact enemy.
EngineConstructionStage
Construction stage that retained a lower-layer failure.
EvaluationStatus
Why an action did or did not fire.
Event
Unified simulation event type.
RaidEventKind
SpecAction
Action returned by a spec handler during rotation evaluation.
WeaponEnchantStat
Stat bucket a weapon-enchant proc buff grants.

Traitsยง

DataResolver
Unified data resolver trait (DynDataResolver restores dyn polymorphism); method futures are Send but not Sync.
DecisionTraceSink
Recipient of Decisions emitted by the interpreter backend.
ProgressSink
Progress reporting contract. Hosts implement throttling in their sink.
ResolverSyncBound
Supertrait bound: Sync off-wasm (keeps &self Send), unconstrained on single-threaded wasm.
SpatialQuery
Deterministic spatial queries over active enemy points and immutable blockers; implementations return sorted, deduplicated IDs.
SpecConfig
Opaque per-spec configuration owned by a spec implementation.
SpecHandler
Executor contract: all spec interaction goes through this trait.
SpecRuntime
Opaque mutable per-spec state reset before every simulation iteration.

Functionsยง

content_catalog
Return the single linked engine-content catalog.
registered_game_bugs
All registered bugs, sorted by slug.
resolve_bug_toggles
Validate raw settings against the registry and freeze them for a run.
select_permanent_enchant
Selects an entry using SimCโ€™s verbose-name alias and item-mask rules.
tokenize_name
Tokenizes a display name for profile lookup.