Skip to main content

TelemetrySink

Struct TelemetrySink 

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§

§

impl TelemetrySink

pub fn new() -> TelemetrySink

pub fn clear_events(&mut self)

Clear per-iteration observations while retaining target metadata and every allocation.

pub fn clear_all(&mut self)

Clear observations and immutable encounter metadata for full sink teardown.

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

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

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

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

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

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

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

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

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

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

pub fn install_targets(&mut self, targets: &[TargetMetadata])

Install the deterministic target dictionary for the sink’s encounter.

Trait Implementations§

§

impl Debug for TelemetrySink

§

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

Formats the value using the given formatter. Read more
§

impl Default for TelemetrySink

§

fn default() -> TelemetrySink

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.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> SpecConfig for T
where T: Any + Debug + Send,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

impl<T> SpecRuntime for T
where T: Any + Debug + Default + Send,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn reset(&mut self)

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
Source§

impl<T> ResolverSyncBound for T
where T: Sync + ?Sized,