Skip to main content

TelemetrySink

Struct TelemetrySink 

Source
pub struct TelemetrySink {
    pub damage: Vec<DamageEvent>,
    pub auras: Vec<AuraEvent>,
    pub resources: Vec<ResourceEvent>,
    pub cooldowns: Vec<CooldownEvent>,
    pub casts: Vec<CastEvent>,
    pub encounter: Vec<EncounterTelemetryEvent>,
    pub targets: Vec<TargetMetadata>,
    pub(crate) timeline_order: Vec<TimelineEventIndex>,
}
Expand description

Collects per-iteration combat events for post-simulation analysis.

Fields§

§damage: Vec<DamageEvent>§auras: Vec<AuraEvent>§resources: Vec<ResourceEvent>§cooldowns: Vec<CooldownEvent>§casts: Vec<CastEvent>§encounter: Vec<EncounterTelemetryEvent>§targets: Vec<TargetMetadata>§timeline_order: Vec<TimelineEventIndex>

Implementations§

Source§

impl TelemetrySink

Source

pub(crate) const DAMAGE_CAPACITY: usize = 1024

Source

pub(crate) const AURA_CAPACITY: usize = 256

Source

pub(crate) const RESOURCE_CAPACITY: usize = 512

Source

pub(crate) const COOLDOWN_CAPACITY: usize = 128

Source

pub(crate) const CAST_CAPACITY: usize = 512

Source

pub(crate) const ENCOUNTER_CAPACITY: usize = 128

Source

pub fn new() -> Self

Source

pub fn clear(&mut self)

Source

pub fn emit_damage(&mut self, event: &DamageEvent)

Source

pub fn emit_aura_apply( &mut self, aura_id: u32, stacks: u8, time_ms: u32, scope: AuraTelemetryScope, )

Source

pub fn emit_aura_refresh( &mut self, aura_id: u32, stacks: u8, time_ms: u32, scope: AuraTelemetryScope, )

Source

pub fn emit_aura_expire( &mut self, aura_id: u32, time_ms: u32, scope: AuraTelemetryScope, )

Source

pub fn emit_resource(&mut self, event: &ResourceEvent)

Source

pub fn emit_cooldown_start( &mut self, spell_id: u32, duration_ms: u32, time_ms: u32, )

Source

pub fn emit_cast( &mut self, spell_id: u32, time_ms: u32, gcd_ms: u32, scope: TelemetryScope, )

Source

pub fn emit_encounter(&mut self, event: EncounterTelemetryEvent)

Source

pub fn timeline_order(&self) -> &[TimelineEventIndex]

Stable insertion order shared by casts, damage, and encounter lifecycle events.

Source

pub fn set_targets(&mut self, targets: Vec<TargetMetadata>)

Install the deterministic encounter target dictionary for this iteration.

Source

pub(crate) fn emit_aura(&mut self, event: AuraEvent)

Trait Implementations§

Source§

impl Debug for TelemetrySink

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TelemetrySink

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more