Skip to main content

HookCtx

Struct HookCtx 

Source
pub struct HookCtx<'a> {
Show 13 fields pub(crate) state: &'a mut CombatState, pub(crate) buf: &'a mut DenseBuffer, pub(crate) sink: &'a mut TelemetrySink, pub(crate) now: SimTime, pub(crate) source_damage_flags: DamageFlags, pub(crate) source_npc_id: Option<u32>, pub(crate) source: ActorId, pub(crate) target: Option<EnemyIdx>, pub(crate) effect_target: Option<ActorId>, pub(crate) rng: &'a mut dyn FnMut() -> f64, driver_spell_id: u32, empower_rank: u8, free_action_source: Option<FreeActionSource>,
}
Expand description

Constrained context exposing only the operations cast hooks may perform.

Fields§

§state: &'a mut CombatState§buf: &'a mut DenseBuffer§sink: &'a mut TelemetrySink§now: SimTime§source_damage_flags: DamageFlags§source_npc_id: Option<u32>§source: ActorId§target: Option<EnemyIdx>§effect_target: Option<ActorId>§rng: &'a mut dyn FnMut() -> f64§driver_spell_id: u32

Spell or aura that invoked this hook; provenance for resource gains and telemetry.

§empower_rank: u8§free_action_source: Option<FreeActionSource>

Implementations§

Source§

impl HookCtx<'_>

Source

pub(crate) fn with_source_damage_flags(self, flags: DamageFlags) -> Self

Source

pub(crate) fn with_effect_target(self, target: ActorId) -> Self

Source

pub(crate) fn with_source_npc_id(self, npc_id: Option<u32>) -> Self

Source

pub(super) fn source_flags(&self, flags: DamageFlags) -> DamageFlags

Source

pub(super) fn resolved_pet_coefficient( &self, flags: DamageFlags, stat: PetStatKind, coefficient: f64, ) -> f64

Source

fn aura_local(&self, aura_id: u32) -> Option<LocalAuraIdx>

Source§

impl HookCtx<'_>

Source

pub const fn active_channel_ticks_remaining(&self) -> u8

Number of scheduled ticks still belonging to the active channel.

Source

pub const fn is_last_channel_tick(&self) -> bool

Whether the channel tick being processed is the channel’s final one, as SimC’s last_tick().

The signal is the channel’s own remaining-tick count rather than a timestamp comparison.

Source

pub fn multiply_active_channel_damage(&mut self, multiplier: f64) -> bool

Multiply damage dealt by every tick of the channel currently being started.

Cast hooks can snapshot cast-start mechanics without projecting them into a temporary aura. Returns false outside an active channel or for an invalid multiplier.

Source§

impl HookCtx<'_>

Source

pub(crate) fn schedule_periodic_driver( &mut self, delay_ms: u32, driver_index: usize, expires_at: Option<SimTime>, target: Option<EnemyIdx>, )

Source

pub(crate) fn schedule_effect_program( &mut self, delay_ms: u32, effects: SpellEffectRange, profile_spell_id: u32, flags: DamageFlags, originating_proc_driver_spell_id: u32, )

Source§

impl<'a> HookCtx<'a>

Source

pub fn new(services: HookCtxServices<'a>, request: HookCtxRequest) -> Self

Source

pub const fn view(&self) -> HookView<'_>

Source

pub const fn free_action_source(&self) -> Option<FreeActionSource>

Provenance for this hook’s cost-free action, if it was dispatched as one.

Source

pub const fn source(&self) -> ActorId

Source

pub const fn target(&self) -> Option<EnemyIdx>

Source

pub const fn empower_rank(&self) -> Option<u8>

One-based empower rank selected for the cast whose hook is running.

Source

pub fn set_health_fraction(&mut self, fraction: f64)

Update this friendly actor’s canonical health and fire active threshold crossings.

Source

pub fn resolved_spell_effect_targets( &mut self, geometry_effect: (u32, u8), impact_spell_id: u32, max_targets: Option<u8>, ) -> Vec<EnemyIdx>

Resolve concrete hostile identities using parent-spell geometry and impact-spell LOS rules.

Source

pub fn state(&self) -> &CombatState

Source

pub fn talent_rank(&self, talent_spell_id: u32) -> u8

Selected rank for a decoded talent, or zero when it is not selected.

Source

pub fn talent_selected(&self, talent_spell_id: u32) -> bool

Whether a decoded talent is selected at any rank.

Source

pub fn selected_talent_proc_chance(&self, talent_spell_id: u32) -> f64

Selected talent’s authoritative SpellAuraOptions.ProcChance, or zero when unselected.

Source

pub fn spec_config<T>(&self) -> Option<&T>
where T: SpecConfig,

Source

pub fn spec_runtime<T>(&self) -> Option<&T>
where T: SpecRuntime,

Source

pub fn spec_runtime_mut<T>(&mut self) -> Option<&mut T>
where T: SpecRuntime,

Source

pub fn total_damage(&self) -> f64

Source

pub fn buf(&self) -> &DenseBuffer

Source

pub fn buf_mut(&mut self) -> &mut DenseBuffer

Source

pub fn game_data(&self) -> &ResolvedGameData

Source

pub const fn driver_spell_id(&self) -> u32

The spell or aura whose hook is running; 0 when the caller declared none.

Source

pub fn rng(&mut self) -> &mut dyn FnMut() -> f64

Borrow the iteration’s deterministic uniform RNG.

Source

pub(crate) const fn set_source(&mut self, source: ActorId)

Source

pub(crate) const fn with_empower_rank(self, rank: u8) -> Self

Source

pub(crate) const fn with_free_action_source( self, source: FreeActionSource, ) -> Self

Source

pub(crate) const fn with_driver_spell(self, driver_spell_id: u32) -> Self

Records the spell or aura whose hook is running, so its resource gains carry provenance.

Source

pub(crate) fn combat_ctx(&mut self, target: EnemyIdx) -> CombatCtx<'_>

Source

pub(crate) fn combat_ctx_with_source( &mut self, source: ActorId, target: EnemyIdx, ) -> CombatCtx<'_>

Source

const fn driver_resource_gain_source(&self) -> ResourceGainSource

Source

fn schedule_pending_timer(&mut self, delay_ms: u32, pending: PendingHookTimer)

Trait Implementations§

Source§

impl AuraOps for HookCtx<'_>

Source§

fn with_resolved_target( &mut self, target: EnemyIdx, apply: impl FnOnce(&mut Self), )

Run target-dependent hook effects against one identity from a resolved hit set.

Source§

fn apply_owner_aura(&mut self, local: u8)

Apply a player-owned aura from a pet or guardian callback.

Source§

fn apply_aura_with_duration(&mut self, local: u8, duration_ms: u32)

Apply an aura using a duration computed by the current cast.

Source§

fn apply_aura_with_rolling_multiplier(&mut self, local: u8, multiplier: f64)

Apply a rolling periodic aura while scaling the damage contributed by this application.

Source§

fn apply_pet_aura_with_duration(&mut self, local: u8, duration_ms: u32)

Apply an aura to the primary persistent pet from an owner callback.

Source§

fn add_aura_stack(&mut self, local: u8)

Add one stack without refreshing an active aura’s duration.

Source§

fn add_owner_aura_stack(&mut self, local: u8)

Add a stack to a player-owned aura from a pet or guardian callback.

Source§

fn add_residual_damage(&mut self, local: u8, amount: f64)

Add post-mitigation damage to an aura-local residual pool, applying or refreshing its draining periodic aura.

Source§

fn accumulate_damage(&mut self, local: u8, amount: f64)

Add damage to an aura-local delayed accumulator.

Source§

fn accumulate_owner_damage(&mut self, local: u8, amount: f64)

Add companion damage to a player-owned delayed accumulator.

Source§

fn take_accumulated_damage(&mut self, local: u8) -> f64

Drain an aura-local delayed accumulator.

Source§

fn expire_owner_aura(&mut self, local: u8)

Expire a player-owned aura from a pet or guardian callback.

Source§

fn consume_owner_aura_stack(&mut self, local: u8) -> bool

Consume a stack from a player-owned aura from a pet or guardian callback.

Source§

fn extend_aura(&mut self, local: u8, ms: u32)

Extend an active aura’s expiry by a flat ms (no pandemic recompute).

Source§

fn reduce_aura(&mut self, local: u8, ms: u32)

Shorten an active aura’s expiry by a flat ms, expiring it immediately when exhausted.

Source§

fn is_owner_aura_active(&self, local: u8) -> bool

Query a player-applied aura from a pet or guardian callback.

Source§

fn aura_remaining_ms(&self, local: u8) -> Option<u32>

Remaining lifetime of the exact aura instance in this hook context.

Returns None when inactive and u32::MAX for a permanent aura.

Source§

fn flat_periodic_damage_remaining(&self, local: u8) -> Option<f64>

Remaining pre-modifier damage in an active flat-damage periodic.

Source§

fn now(&self) -> SimTime

Source§

fn apply_aura(&mut self, local: u8)

Source§

fn apply_aura_n(&mut self, local: u8, n: i32)

Source§

fn residual_damage_remaining(&self, local: u8) -> f64

Source§

fn expire_aura(&mut self, local: u8)

Source§

fn consume_aura(&mut self, local: u8) -> bool

Source§

fn consume_aura_stack(&mut self, local: u8) -> bool

Source§

fn consume_aura_stacks(&mut self, local: u8, count: i32) -> i32

Source§

fn refresh_aura_snapshot_multiplier( &mut self, local: u8, multiplier: f64, ) -> bool

Source§

fn is_aura_active(&self, local: u8) -> bool

Source§

fn aura_stacks(&self, local: u8) -> i32

Source§

fn aura_local_index(&self, aura_id: u32) -> Option<u8>

Source§

fn apply_aura_id(&mut self, aura_id: u32)

Source§

fn apply_aura_id_n(&mut self, aura_id: u32, n: i32)

Source§

fn add_aura_stack_id(&mut self, aura_id: u32)

Source§

fn expire_aura_id(&mut self, aura_id: u32)

Source§

fn is_aura_active_id(&self, aura_id: u32) -> bool

Source§

fn aura_stacks_id(&self, aura_id: u32) -> i32

Source§

fn flat_periodic_damage_remaining_id(&self, aura_id: u32) -> Option<f64>

Source§

fn take_aura_stacks_id(&mut self, aura_id: u32) -> i32

Source§

impl CooldownOps for HookCtx<'_>

Source§

fn spend_spell_charge(&mut self, spell: u8) -> bool

Source§

fn reduce_cooldown(&mut self, spell: u8, amount_ms: u32)

Source§

fn reset_cooldown(&mut self, spell: u8)

Source§

fn start_cooldown(&mut self, spell: u8)

Source§

fn set_spell_gate(&mut self, spell: u8, gate: SpellGate, available: bool)

Source§

fn grant_charges(&mut self, spell: u8, amount: u8)

Source§

fn spell_cooldown_ms(&self, spell: u8) -> u32

Source§

fn spell_cooldown_remaining_ms(&self, spell: u8) -> u32

Source§

fn spell_ready(&self, spell: u8) -> bool

Source§

fn spell_current_charges(&self, spell: u8) -> i32

Source§

impl DamageOps for HookCtx<'_>

Source§

fn deal_damage_ap_result( &mut self, spell_id: u32, coef: f64, flags: DamageFlags, ) -> DamageOutcome

Deal one attack-power hit and return its post-mitigation outcome.

Source§

fn deal_damage_from_result( &mut self, spell_id: u32, parent: DamageOutcome, multiplier: f64, flags: DamageFlags, ) -> DamageOutcome

Derive a non-crit child hit from a parent’s final amount under the child’s own modifiers.

The parent amount already contains player-wide damage and versatility multipliers.

The child retains its spell-scoped and target modifiers. Those inherited terms are not applied a second time.

Source§

fn deal_profiled_damage_ap( &mut self, spell_id: u32, profile_spell_id: u32, coef: f64, flags: DamageFlags, )

Deal an AP hit under one spell’s formula while reporting a distinct combat-log identity.

Source§

fn haste_multiplier(&self) -> f64

Current outgoing spell/melee haste multiplier (1.0 means unmodified cadence).

Source§

fn deal_damage_ap_to_target( &mut self, target: EnemyIdx, spell_id: u32, coef: f64, flags: DamageFlags, )

Deal exactly one attack-power hit to a previously resolved enemy identity.

Source§

fn deal_pet_damage_ap_for_npc( &mut self, npc_id: u32, spell_id: u32, coefficient: f64, )

Deal pet AP damage for an explicitly identified NPC actor.

Source§

fn deal_damage_sp_to_target( &mut self, target: EnemyIdx, spell_id: u32, coef: f64, flags: DamageFlags, )

Deal exactly one spell-power hit to a previously resolved enemy identity.

Source§

fn deal_resolved_damage(&mut self, spell_id: u32, amount: f64)

Deal a post-mitigation redirected amount without a second modifier pass.

Source§

fn deal_triggered_damage( &mut self, source_spell_id: u32, effect_index: u8, multiplier: f64, flags: DamageFlags, ) -> bool

Follow one resolved DBC trigger edge and deal its terminal child damage.

Source§

fn deal_item_damage_sp(&mut self, spell_id: u32)

Deal an item’s spell-power damage, reading its effect-1 SP coefficient from game data.

Source§

fn deal_damage_ap(&mut self, spell_id: u32, coef: f64, flags: DamageFlags)

Source§

fn deal_damage_ap_if_positive( &mut self, spell_id: u32, coefficient: f64, flags: DamageFlags, )

Source§

fn deal_effect_damage_ap( &mut self, effect: (u32, u8), multiplier: f64, flags: DamageFlags, )

Source§

fn deal_effect_damage_ap_with_geometry( &mut self, effect: (u32, u8), geometry_effect: (u32, u8), multiplier: f64, flags: DamageFlags, )

Source§

fn deal_effect_damage_sp_with_geometry( &mut self, effect: (u32, u8), geometry_effect: (u32, u8), multiplier: f64, flags: DamageFlags, )

Source§

fn deal_physical_damage_ap_if_positive( &mut self, spell_id: u32, coefficient: f64, )

Source§

fn deal_pet_damage_ap(&mut self, spell_id: u32, coefficient: f64)

Source§

fn deal_physical_pet_damage_ap(&mut self, spell_id: u32, coefficient: f64)

Source§

fn deal_damage_sp(&mut self, spell_id: u32, coef: f64, flags: DamageFlags)

Source§

fn deal_profiled_damage_sp( &mut self, spell_id: u32, profile_spell_id: u32, coef: f64, flags: DamageFlags, )

Source§

fn deal_damage_flat(&mut self, spell_id: u32, amount: f64)

Source§

fn player_swing_period_ms(&self, hand: SwingHand) -> Option<u32>

Source§

fn effect_base_points(&self, effect: (u32, u8)) -> f64

Source§

fn effect_points(&self, effect: (u32, u8)) -> f64

Source§

fn effect_percent(&self, effect: (u32, u8)) -> f64

Source§

fn effect_ap_coefficient(&self, effect: (u32, u8)) -> f64

Source§

fn effect_sp_coefficient(&self, effect: (u32, u8)) -> f64

Source§

fn target_health_fraction(&self) -> f64

Source§

impl Debug for HookCtx<'_>

Source§

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

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

impl GuardianOps for HookCtx<'_>

Source§

fn command_guardians(&mut self, tag: u32, ability_index: usize) -> usize

Drive an on_demand ability on every active guardian with tag, returning how many fired.

Source§

fn summon_guardian(&mut self, spec: GuardianSpec) -> GuardianHandle

Source§

fn active_guardian_count(&self, tag: u32) -> usize

Source§

fn extend_guardians(&mut self, tag: u32, amount_ms: u32)

Source§

fn dismiss_guardians(&mut self, tag: u32, count: usize) -> usize

Source§

impl ProcOps for HookCtx<'_>

Source§

fn roll_threshold( &mut self, idx: LocalThresholdIdx, increment_scale: f64, ) -> bool

Add one trigger event to an accumulated-threshold proc; increment_scale multiplies the tracker’s uniform roll (plain callers pass 1.0), returning true when the threshold procs.

Source§

fn roll_system_rppm(&mut self, driver_spell_id: u32) -> bool

Roll a shared proc system’s RPPM tracker by its DBC driver spell id.

The driver also owns its optional DBC proc-category recovery.

Attempts inside that window do not advance the tracker. Successful rolls start recovery.

Source§

fn proc_category_ready(&self, driver_spell_id: u32) -> bool

Whether a DBC proc driver is outside its ProcCategoryRecovery window.

Source§

fn start_proc_category_cooldown(&mut self, driver_spell_id: u32)

Start the DBC ProcCategoryRecovery window for a proc driver.

Source§

fn roll_attempt_proc( &mut self, driver_spell_id: u32, chance_for_attempt: impl FnOnce(u32) -> f64, ) -> bool

Roll a driver-scoped proc whose chance is a function of its current attempt number.

Source§

fn add_proc_counter(&mut self, driver_spell_id: u32, amount: u32) -> u32

Add to a driver-scoped event counter and return its new value.

Source§

fn reset_proc_counter(&mut self, driver_spell_id: u32)

Clear a driver-scoped event counter.

Source§

fn proc_counter(&self, driver_spell_id: u32) -> u32

Read a driver-scoped event counter without changing it.

Source§

fn mark_proc_flags_once(&mut self, driver_spell_id: u32, flags: u32) -> bool

Mark one or more driver-scoped flags and return true only on their first occurrence.

Source§

fn consume_proc_counter(&mut self, driver_spell_id: u32, amount: u32) -> u32

Consume from a driver-scoped event counter and return the remaining value.

Source§

fn advance_proc_counter_by( &mut self, driver_spell_id: u32, amount: u32, threshold: u32, ) -> bool

Advance a driver-scoped event counter and return true at the threshold.

Source§

fn advance_proc_counter(&mut self, driver_spell_id: u32, threshold: u32) -> bool

Advance a driver-scoped event counter by one and return true at the threshold.

Source§

fn roll_rppm(&mut self, idx: LocalRppmIdx) -> bool

Source§

fn roll_item_rppm(&mut self, item_id: u32) -> bool

Source§

fn roll_enchant_rppm(&mut self, enchantment_id: u32) -> bool

Source§

fn roll_accumulating_proc( &mut self, driver_spell_id: u32, chance_per_attempt: f64, ) -> bool

Source§

impl ResourceOps for HookCtx<'_>

Source§

fn gain_resource(&mut self, amount: f64) -> f64

Gain primary resource, attributed to the hook’s driver spell. Returns wasted amount.

Source§

fn gain_resource_from(&mut self, amount: f64, source: ResourceGainSource) -> f64

Gain primary resource with explicit provenance.

Source§

fn gain_unmodified_resource_from( &mut self, amount: f64, source: ResourceGainSource, ) -> f64

Gain primary resource without applying active gain multipliers.

Source§

fn gain_secondary_resource(&mut self, amount: f64) -> f64

Gain secondary resource, attributed to the hook’s driver spell. Returns wasted amount.

Source§

fn gain_secondary_resource_from( &mut self, amount: f64, source: ResourceGainSource, ) -> f64

Gain secondary resource with explicit provenance.

Source§

fn spend_secondary_resource(&mut self, amount: f64) -> bool

Source§

fn spend_all_secondary_resource(&mut self, cost: f64) -> f64

Source§

fn secondary_resource(&self) -> f64

Source§

fn primary_resource(&self) -> f64

Source§

fn spell_resource_cost(&self, spell: u8) -> f64

Source§

fn gain_pet_resource(&mut self, npc_id: u32, amount: f64) -> f64

Source§

fn last_primary_spent(&self) -> f64

Source§

fn last_optional_primary_spent(&self) -> f64

Source§

fn last_secondary_spent(&self) -> f64

Source§

impl SchedulingOps for HookCtx<'_>

Source§

fn dispatch_free_action( &mut self, spell_id: u32, source: FreeActionSource, ) -> bool

Execute a registered spell as a cost-free child action on this hook’s locked target.

The child retains its payload, aura/effects, gains, telemetry, and spell hook. It bypasses player costs, cooldowns, GCD/history, and global player-cast hooks.

Source§

fn dispatch_proc_spell( &mut self, spell_id: u32, proc_driver_spell_id: u32, affected: ActorId, ) -> bool

Execute a registered spell spawned by a proc without player action costs.

The originating driver is retained for proc provenance and self-loop suppression.

Source§

fn schedule_hook(&mut self, delay_ms: u32, hook: CastHookFn)

Schedule a hook for delayed execution; a captured target binds the callback and cancels it if that enemy is missing, inactive, or dead when the timer fires.

Source§

fn trigger_periodic_driver(&mut self, driver_spell_id: u32) -> bool

Activate a finite periodic driver by its real spell/passive identity.

Source§

fn trigger_periodic_driver_for( &mut self, driver_spell_id: u32, duration_ms: u32, ) -> bool

Activate a finite periodic driver with a runtime-resolved lifetime.

The driver must be registered as triggered. This overrides the activation lifetime for mechanics whose duration varies per cast.

Source§

fn schedule_ground_effect(&mut self, spec: GroundEffectSpec)

Schedule a location-locked sequence of spatial damage pulses.

Source§

fn schedule_ground_effect_from_data( &mut self, driver_spell_id: u32, timing_effect_index: u8, geometry_effect: (u32, u8), damage_effect: (u32, u8), flags: DamageFlags, ) -> bool

Resolve a driver’s authored duration and pulse period, then schedule its ground payload.

§Panics

Panics if the clamped pulse count does not fit in u8.

Source§

fn schedule_event(&mut self, event: Event)

Auto Trait Implementations§

§

impl<'a> Freeze for HookCtx<'a>

§

impl<'a> !RefUnwindSafe for HookCtx<'a>

§

impl<'a> !Send for HookCtx<'a>

§

impl<'a> !Sync for HookCtx<'a>

§

impl<'a> Unpin for HookCtx<'a>

§

impl<'a> UnsafeUnpin for HookCtx<'a>

§

impl<'a> !UnwindSafe for HookCtx<'a>

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

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

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more