Skip to main content

HookCtx

Struct HookCtx 

Source
pub struct HookCtx<'a> {
Show 14 fields pub(crate) program: &'a CombatProgram, pub(crate) instance: &'a mut CombatInstance, 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) pet_stat_inheritance: PetStatInheritance, 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§

§program: &'a CombatProgram§instance: &'a mut CombatInstance§sink: &'a mut TelemetrySink§now: SimTime§source_damage_flags: DamageFlags§source_npc_id: Option<u32>§pet_stat_inheritance: PetStatInheritance§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_npc_id(self, npc_id: Option<u32>) -> Self

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_pet_stat_inheritance( self, inheritance: PetStatInheritance, ) -> 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§

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.

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_action: LocalDamageActionIdx, 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 with_resolved_spell_effect_targets<T>( &mut self, geometry_effect: DamageEffectId, impact_action: DamageActionId, max_targets: Option<u8>, use_targets: impl FnOnce(&mut Self, &[EnemyIdx]) -> T, ) -> T

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

Finalized target scratch is restored after the callback, including nested resolution.

Source

pub fn program(&self) -> HookProgramView<'_>

Source

pub fn buff_totals(&self) -> BuffTotals

Sum the current player’s finalized buff contributions for this hook target.

Source

pub fn instance(&self) -> &CombatInstance

Source

pub fn talent_rank(&self, talent: DamageActionId) -> u8

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

Source

pub fn talent_selected(&self, talent: DamageActionId) -> bool

Whether a decoded talent is selected at any rank.

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) -> &BoundDenseBuffer

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

fn spell_identity(&self, local: LocalSpellIdx) -> LocalSpellIdx

Source

fn aura_identity(&self, local: LocalAuraIdx) -> LocalAuraIdx

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: LocalAuraIdx)

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

Source§

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

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

Source§

fn apply_aura_with_rolling_multiplier( &mut self, local: LocalAuraIdx, 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: LocalAuraIdx, duration_ms: u32, )

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

Source§

fn add_aura_stack(&mut self, local: LocalAuraIdx)

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

Source§

fn add_owner_aura_stack(&mut self, local: LocalAuraIdx)

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

Source§

fn add_residual_damage(&mut self, local: LocalAuraIdx, 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: LocalAuraIdx, amount: f64)

Add damage to an aura-local delayed accumulator.

Source§

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

Add companion damage to a player-owned delayed accumulator.

Source§

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

Drain an aura-local delayed accumulator.

Source§

fn expire_owner_aura(&mut self, local: LocalAuraIdx)

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

Source§

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

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

Source§

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

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

Source§

fn reduce_aura(&mut self, local: LocalAuraIdx, 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: LocalAuraIdx) -> bool

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

Source§

fn aura_remaining_ms(&self, local: LocalAuraIdx) -> 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: LocalAuraIdx) -> Option<f64>

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

Source§

fn now(&self) -> SimTime

Source§

fn apply_aura(&mut self, local: LocalAuraIdx)

Source§

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

Source§

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

Source§

fn expire_aura(&mut self, local: LocalAuraIdx)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl CooldownOps for HookCtx<'_>

Source§

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

Source§

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

Source§

fn reset_cooldown(&mut self, spell: LocalSpellIdx)

Source§

fn start_cooldown(&mut self, spell: LocalSpellIdx)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl DamageOps for HookCtx<'_>

Source§

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

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

Source§

fn deal_damage_from_result( &mut self, action: DamageActionId, 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, action: DamageActionId, profile: DamageActionId, 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, action: DamageActionId, coef: f64, flags: DamageFlags, )

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

Source§

fn deal_pet_damage_ap_with_inheritance( &mut self, action: DamageActionId, coefficient: f64, inheritance_multiplier: f64, )

Deal pet AP damage using a construction-resolved NPC inheritance scalar.

Source§

fn deal_damage_sp_to_target( &mut self, target: EnemyIdx, action: DamageActionId, coef: f64, flags: DamageFlags, )

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

Source§

fn deal_resolved_damage(&mut self, action: DamageActionId, amount: f64)

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

Source§

fn deal_triggered_damage( &mut self, effect: DamageEffectId, 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, action: DamageActionId)

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

Source§

fn deal_damage_ap( &mut self, action: DamageActionId, coef: f64, flags: DamageFlags, )

Source§

fn deal_damage_ap_if_positive( &mut self, action: DamageActionId, coefficient: f64, flags: DamageFlags, )

Source§

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

Source§

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

Source§

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

Source§

fn deal_physical_damage_ap_if_positive( &mut self, action: DamageActionId, coefficient: f64, )

Source§

fn deal_pet_damage_ap(&mut self, action: DamageActionId, coefficient: f64)

Source§

fn deal_physical_pet_damage_ap( &mut self, action: DamageActionId, coefficient: f64, )

Source§

fn deal_damage_sp( &mut self, action: DamageActionId, coef: f64, flags: DamageFlags, )

Source§

fn deal_profiled_damage_sp( &mut self, action: DamageActionId, profile: DamageActionId, coef: f64, flags: DamageFlags, )

Source§

fn deal_damage_flat(&mut self, action: DamageActionId, amount: f64)

Source§

fn deal_hook_flat_damage(&mut self, action: DamageActionId) -> bool

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn effect_period_ms(&self, effect: DamageEffectId) -> u32

Source§

fn action_proc_chance(&self, action: DamageActionId) -> f64

Source§

fn action_gcd_ms(&self, action: DamageActionId) -> u32

Source§

fn action_aura_duration_ms(&self, action: DamageActionId) -> u32

Source§

fn action_aura_tick_ms(&self, action: DamageActionId) -> u32

Source§

fn action_secondary_gain(&self, action: DamageActionId) -> f64

Source§

fn action_hook_scalar(&self, action: DamageActionId) -> Option<f64>

Source§

fn action_passive_direct_damage_mult(&self, action: DamageActionId) -> f64

Source§

fn action_is_melee(&self, action: DamageActionId) -> bool

Source§

fn action_has_direct_damage(&self, action: DamageActionId) -> bool

Source§

fn action_requires_main_hand(&self, action: DamageActionId) -> bool

Source§

fn action_requires_off_hand(&self, action: DamageActionId) -> bool

Source§

fn action_suppresses_caster_procs(&self, action: DamageActionId) -> bool

Source§

fn impact_has_label(&self, impact: ImpactEvent, label: i32) -> bool

Source§

fn impact_is_physical(&self, impact: ImpactEvent) -> bool

Source§

fn impact_is_nature(&self, impact: ImpactEvent) -> bool

Source§

fn impact_generates_primary_resource(&self, impact: ImpactEvent) -> bool

Source§

fn effect_affects_impact( &self, effect: DamageEffectId, impact: ImpactEvent, ) -> bool

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, ) -> Result<GuardianHandle, GuardianSummonError>

Summons one guardian from the finalized specification. Read more
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, binding: SystemRppmBinding) -> 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, binding: ProcCategoryBinding) -> bool

Whether a DBC proc driver is outside its ProcCategoryRecovery window.

Source§

fn start_proc_category_cooldown(&mut self, binding: ProcCategoryBinding)

Start the DBC ProcCategoryRecovery window for a proc driver.

Source§

fn roll_attempt_proc( &mut self, binding: ProcCounterBinding, 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, binding: ProcCounterBinding, amount: u32) -> u32

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

Source§

fn reset_proc_counter(&mut self, binding: ProcCounterBinding)

Clear a driver-scoped event counter.

Source§

fn proc_counter(&self, binding: ProcCounterBinding) -> u32

Read a driver-scoped event counter without changing it.

Source§

fn mark_proc_flags_once( &mut self, binding: ProcCounterBinding, 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, binding: ProcCounterBinding, amount: u32, ) -> u32

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

Source§

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

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

Source§

fn advance_proc_counter( &mut self, binding: ProcCounterBinding, 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_accumulating_proc( &mut self, binding: ProcCounterBinding, 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 primary_resource_max(&self) -> f64

Source§

fn primary_resource_fraction(&self) -> f64

Source§

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

Source§

fn primary_pet_resource(&self) -> Option<PetResourceBinding>

Source§

fn gain_pet_resource(&mut self, binding: PetResourceBinding, 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: LocalSpellIdx, 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: LocalSpellIdx, proc_driver: RppmBinding, 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: PeriodicDriverBinding) -> bool

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

Source§

fn trigger_periodic_driver_for( &mut self, driver: PeriodicDriverBinding, 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, effect: GroundEffectId) -> bool

Schedule a location-locked sequence of spatial damage pulses.

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