Skip to main content

SpellDefinitionDraft

Struct SpellDefinitionDraft 

Source
pub struct SpellDefinitionDraft {
Show 110 fields pub(crate) cast_time_ms: u32, pub(crate) empower_cast_times_ms: Vec<u32>, pub(crate) max_empower_aura_id: u32, pub(crate) cooldown_hasted: bool, pub(crate) gcd_haste_type: GcdHasteType, pub(crate) cooldown_category: Option<CooldownCategoryId>, pub(crate) category_cooldown_secs: f64, pub(crate) charge_category: Option<CooldownCategoryId>, pub(crate) start_recovery_category: Option<CooldownCategoryId>, pub(crate) usable_while_casting: bool, pub(crate) usable_while_moving: bool, pub(crate) explicit_target_mask: u32, pub(crate) required_explicit_target_mask: u32, pub(crate) shapeshift_required_mask: u64, pub(crate) shapeshift_excluded_mask: u64, pub(crate) caster_aura_spell: i32, pub(crate) caster_aura_state: Option<AuraState>, pub(crate) exclude_caster_aura_spell: i32, pub(crate) exclude_caster_aura_state: Option<AuraState>, pub(crate) target_aura_spell: i32, pub(crate) target_aura_state: Option<AuraState>, pub(crate) exclude_target_aura_spell: i32, pub(crate) exclude_target_aura_state: Option<AuraState>, pub(crate) fixed_travel_time_override_ms: Option<u32>, pub(crate) projectile_speed: f64, pub(crate) launch_delay_s: f64, pub(crate) dbc_fixed_travel_time: bool, pub(crate) gcd_ms: u32, pub(crate) cooldown_secs: Option<f64>, pub(crate) max_charges: u8, pub(crate) recharge_secs: Option<f64>, pub(crate) resource_cost: f64, pub(crate) optional_resource_cost: f64, pub(crate) resource_cost_pct: ResourceCostPercent, pub(crate) maximum_resource_cost_pct: ResourceCostPercent, pub(crate) optional_resource_cost_pct: ResourceCostPercent, pub(crate) resource_gain: f64, pub(crate) secondary_resource_cost: f64, pub(crate) secondary_optional_resource_cost: f64, pub(crate) secondary_resource_gain: f64, pub(crate) health_cost: f64, pub(crate) health_cost_pct: f64, pub(crate) health_max_cost_pct: f64, pub(crate) health_optional_cost: f64, pub(crate) health_optional_cost_pct: ResourceCostPercent, pub(crate) damage: BuilderDamageDef, pub(crate) damage_may_crit: bool, pub(crate) damage_attribute_flags: DamageFlags, pub(crate) damage_effect: Option<DamageEffectRef>, pub(crate) base_points: f64, pub(crate) applies_aura: Option<LocalAuraIdx>, pub(crate) followup_effects: Vec<BuilderSpellEffect>, pub(crate) trigger_program_predicates: Vec<BuilderTriggerProgramPredicate>, pub(crate) infer_data_damage: bool, pub(crate) applies_aura_ids: Vec<u32>, pub(crate) cdr_effects: Vec<CdrEffect>, pub(crate) hook: Option<CastHookFn>, pub(crate) empower_release_hook: Option<fn(_: &HookCtx<'_>, rank: u8) -> EmpowerReleaseAdjustment>, pub(crate) tick_hook: Option<CastHookFn>, pub(crate) is_pet: bool, pub(crate) requires_unshifted: bool, pub(crate) allow_while_unshifted: bool, pub(crate) requires_stealth: bool, pub(crate) requires_behind_target: bool, pub(crate) requires_main_hand: bool, pub(crate) requires_off_hand: bool, pub(crate) equipped_item_requirement: Option<EquippedItemRequirement>, pub(crate) breaks_stealth: bool, pub(crate) aoe_max_targets: u8, pub(crate) aoe_reduced_targets: u8, pub(crate) aoe_full_targets: u8, pub(crate) aoe_base_mult: f64, pub(crate) chain_targeting: bool, pub(crate) chain_multiplier: f64, pub(crate) split: bool, pub(crate) is_aoe: bool, pub(crate) is_channel: bool, pub(crate) channel_tick_count: u8, pub(crate) channel_tick_interval_ms: u32, pub(crate) channel_tick_zero: bool, pub(crate) channel_tick_is_periodic: bool, pub(crate) channel_hasted_ticks: bool, pub(crate) channel_duration_hasted: bool, pub(crate) channel_tick_damage: BuilderDamageDef, pub(crate) channel_tick_may_crit: bool, pub(crate) channel_tick_spell_id: Option<u32>, pub(crate) channel_tick_damage_alt: BuilderDamageDef, pub(crate) channel_tick_damage_alt_may_crit: bool, pub(crate) channel_tick_damage_alt_spell_id: u32, pub(crate) channel_tick_damage_aura: u32, pub(crate) channel_tick_cost: f64, pub(crate) channel_tick_cost_alt: f64, pub(crate) channel_tick_cost_aura: u32, pub(crate) channel_tick_effects: Vec<BuilderSpellEffect>, pub(crate) channel_complete_effects: Vec<BuilderSpellEffect>, pub(crate) channel_gcd_on_start: bool, pub(crate) channel_apply_lag: bool, pub(crate) gating_aura_id: u32, pub(crate) gating_aura_min_stacks: u8, pub(crate) cost_bypass_aura_id: u32, pub(crate) consume_aura_on_cast_id: u32, pub(crate) cooldown_bypass_aura_id: u32, pub(crate) execute_below_pct: f64, pub(crate) instant_cast_aura_id: u32, pub(crate) override_aura_id: u32, pub(crate) override_spell_id: u32, pub(crate) override_aura_min_stacks: u8, pub(crate) override_shares_base_cooldown: bool, pub(crate) override_preserves_aura: bool, pub(crate) guaranteed_crit: bool,
}
Expand description

Mutable draft of a single castable spell definition.

Fields§

§cast_time_ms: u32§empower_cast_times_ms: Vec<u32>§max_empower_aura_id: u32§cooldown_hasted: bool§gcd_haste_type: GcdHasteType§cooldown_category: Option<CooldownCategoryId>§category_cooldown_secs: f64§charge_category: Option<CooldownCategoryId>§start_recovery_category: Option<CooldownCategoryId>§usable_while_casting: bool§usable_while_moving: bool§explicit_target_mask: u32§required_explicit_target_mask: u32§shapeshift_required_mask: u64§shapeshift_excluded_mask: u64§caster_aura_spell: i32§caster_aura_state: Option<AuraState>§exclude_caster_aura_spell: i32§exclude_caster_aura_state: Option<AuraState>§target_aura_spell: i32§target_aura_state: Option<AuraState>§exclude_target_aura_spell: i32§exclude_target_aura_state: Option<AuraState>§fixed_travel_time_override_ms: Option<u32>§projectile_speed: f64§launch_delay_s: f64§dbc_fixed_travel_time: bool§gcd_ms: u32§cooldown_secs: Option<f64>§max_charges: u8§recharge_secs: Option<f64>§resource_cost: f64§optional_resource_cost: f64§resource_cost_pct: ResourceCostPercent§maximum_resource_cost_pct: ResourceCostPercent§optional_resource_cost_pct: ResourceCostPercent§resource_gain: f64§secondary_resource_cost: f64§secondary_optional_resource_cost: f64§secondary_resource_gain: f64§health_cost: f64§health_cost_pct: f64§health_max_cost_pct: f64§health_optional_cost: f64§health_optional_cost_pct: ResourceCostPercent§damage: BuilderDamageDef§damage_may_crit: bool§damage_attribute_flags: DamageFlags§damage_effect: Option<DamageEffectRef>§base_points: f64§applies_aura: Option<LocalAuraIdx>§followup_effects: Vec<BuilderSpellEffect>§trigger_program_predicates: Vec<BuilderTriggerProgramPredicate>§infer_data_damage: bool§applies_aura_ids: Vec<u32>§cdr_effects: Vec<CdrEffect>§hook: Option<CastHookFn>§empower_release_hook: Option<fn(_: &HookCtx<'_>, rank: u8) -> EmpowerReleaseAdjustment>§tick_hook: Option<CastHookFn>§is_pet: bool§requires_unshifted: bool§allow_while_unshifted: bool§requires_stealth: bool§requires_behind_target: bool§requires_main_hand: bool§requires_off_hand: bool§equipped_item_requirement: Option<EquippedItemRequirement>§breaks_stealth: bool§aoe_max_targets: u8§aoe_reduced_targets: u8§aoe_full_targets: u8§aoe_base_mult: f64§chain_targeting: bool§chain_multiplier: f64§split: bool§is_aoe: bool§is_channel: bool§channel_tick_count: u8§channel_tick_interval_ms: u32§channel_tick_zero: bool§channel_tick_is_periodic: bool§channel_hasted_ticks: bool§channel_duration_hasted: bool§channel_tick_damage: BuilderDamageDef§channel_tick_may_crit: bool§channel_tick_spell_id: Option<u32>§channel_tick_damage_alt: BuilderDamageDef§channel_tick_damage_alt_may_crit: bool§channel_tick_damage_alt_spell_id: u32§channel_tick_damage_aura: u32§channel_tick_cost: f64§channel_tick_cost_alt: f64§channel_tick_cost_aura: u32§channel_tick_effects: Vec<BuilderSpellEffect>§channel_complete_effects: Vec<BuilderSpellEffect>§channel_gcd_on_start: bool§channel_apply_lag: bool§gating_aura_id: u32§gating_aura_min_stacks: u8§cost_bypass_aura_id: u32§consume_aura_on_cast_id: u32§cooldown_bypass_aura_id: u32§execute_below_pct: f64§instant_cast_aura_id: u32§override_aura_id: u32§override_spell_id: u32§override_aura_min_stacks: u8§override_shares_base_cooldown: bool§override_preserves_aura: bool§guaranteed_crit: bool

Implementations§

Source§

impl SpellDefinitionDraft

Source

pub fn additional_damage_ap_from_data( self, lookup: EffectLookup<'_>, multiplier: f64, ) -> Result<Self, BuilderError>

Source

pub fn additional_damage_ap_from_data_typed( self, lookup: EffectLookup<'_>, multiplier: f64, ap_type: WeaponApType, ) -> Result<Self, BuilderError>

Source

pub fn additional_damage_sp_from_data( self, lookup: EffectLookup<'_>, multiplier: f64, ) -> Result<Self, BuilderError>

Source

pub fn triggered_damage_from_data( self, lookup: EffectLookup<'_>, multiplier: f64, ) -> Result<Self, BuilderError>

Append the terminal child damage reached through an exact DBC trigger edge.

Source

pub fn apply_cooldown_pools_from_data( self, data: &ResolvedGameData, spell_id: u32, ) -> Result<Self, BuilderError>

Applies every DBC cooldown component without collapsing their independent pools.

Source

pub fn apply_base_from_data( self, data: &ResolvedGameData, spell_id: u32, ) -> Result<Self, BuilderError>

Apply the standard data-driven field set for spell_id, erroring on any missing required field.

Source

pub fn apply_aoe_from_data(self, data: &ResolvedGameData) -> Self

Apply DBC chain targeting and its per-hop multiplier from the primary damage effect.

Source

pub fn damage_ap_from_data( self, lookup: EffectLookup<'_>, ) -> Result<Self, BuilderError>

Set AP-coefficient damage, resolving coef + physical flag from data; errors if the school mask is missing on populated data.

Source

pub fn damage_ap_from_data_typed( self, lookup: EffectLookup<'_>, ap_type: WeaponApType, ) -> Result<Self, BuilderError>

Like Self::damage_ap_from_data with an explicit weapon-AP composite.

Source

pub fn damage_sp_from_data( self, lookup: EffectLookup<'_>, ) -> Result<Self, BuilderError>

Set SP-coefficient damage, resolving coef + physical flag from data; errors if the school mask is missing on populated data.

Source

pub fn channel_tick_damage_ap_from_data( self, lookup: EffectLookup<'_>, ) -> Result<Self, BuilderError>

Set AP-coefficient channel-tick damage, resolving coef + physical flag from game data.

Source

pub fn channel_tick_damage_sp_from_data( self, lookup: EffectLookup<'_>, ) -> Result<Self, BuilderError>

Set SP-coefficient channel-tick damage, resolving coef + physical flag from game data.

Source

pub fn channel_tick_damage_alt_ap_from_data( self, lookup: EffectLookup<'_>, aura_id: u32, ) -> Result<Self, BuilderError>

Set an aura-conditional AP channel-tick payload from game data.

Source

pub fn channel_tick_damage_alt_sp_from_data( self, lookup: EffectLookup<'_>, aura_id: u32, ) -> Result<Self, BuilderError>

Set an aura-conditional SP channel-tick payload from game data.

Source

fn apply_empower_from_data( self, data: &ResolvedGameData, spell_id: u32, ) -> Result<Self, BuilderError>

Source

fn additional_damage( self, effect: DamageEffectRef, damage: BuilderDamageDef, base_points: f64, may_crit: bool, attribute_flags: DamageFlags, equipment: DamageEquipmentRequirements, ) -> Self

Source

fn additional_triggered_damage( self, triggered: TriggeredDamage, multiplier: f64, may_crit: bool, attribute_flags: DamageFlags, ) -> Result<Self, BuilderError>

Source§

impl SpellDefinitionDraft

Source

pub fn max_targets(self, n: u8) -> Self

Hard cap on targets selected by a multi-target spell (0 = unlimited).

Source

pub fn reduced_aoe_targets(self, n: u8) -> Self

Beyond this count, per-target damage is multiplied by sqrt(reduced_aoe_targets / hits).

Source

pub fn full_amount_targets(self, n: u8) -> Self

Number of targets that always receive full damage before sqrt scaling.

Source

pub fn base_aoe_multiplier(self, m: f64) -> Self

Flat multiplier applied to every AoE hit (default 1.0).

Source

pub fn multi_target(self) -> Self

Mark a manually-authored spell as multi-target.

Source

pub fn chain_targets(self, n: u8) -> Self

Apply a DBC chain-target count independently of the chain damage multiplier.

Source

pub fn chain_targeting(self, enabled: bool) -> Self

Mark whether resolved DBC or manifest semantics select chain geometry.

Source

pub fn chain_multiplier(self, m: f64) -> Self

Chain decay multiplier per hop. Hit k gets mult.powi(k).

Source

pub fn split_damage(self) -> Self

Split damage: total damage is divided across hits.

Source§

impl SpellDefinitionDraft

Source

pub fn on_channel_tick(self, hook: CastHookFn) -> Self

Register a hook fired after each channel tick’s damage is applied.

Source

pub fn channel(self, tick_count: u8) -> Self

Mark this spell as a channel of tick_count ticks over cast_time_ms.

Source

pub fn channel_tick_timing(self, interval_ms: u32, tick_zero: bool) -> Self

Source

pub fn channel_tick_direct_damage(self) -> Self

Classify child tick hits as direct damage while retaining channel cadence.

Source

pub fn channel_tick_damage_ap(self, coef: f64, flags: DamageFlags) -> Self

Source

pub fn channel_tick_damage_sp(self, coef: f64, flags: DamageFlags) -> Self

Source

pub fn channel_tick_damage_alt_ap( self, coef: f64, flags: DamageFlags, spell_id: u32, aura_id: u32, ) -> Self

Use an alternate AP payload while aura_id is active.

Source

pub fn channel_tick_damage_alt_sp( self, coef: f64, flags: DamageFlags, spell_id: u32, aura_id: u32, ) -> Self

Use an alternate SP payload while aura_id is active.

Source

pub fn channel_tick_cost(self, amount: f64) -> Self

Per-tick primary-resource cost for a channel; an unaffordable tick ends it early.

Source

pub fn channel_tick_cost_alt(self, amount: f64, aura_id: u32) -> Self

Aura-conditional per-tick cost: spend amount instead while aura_id is active.

Source

pub fn channel_tick_gain(self, amount: f64) -> Self

Source

pub fn channel_tick_secondary_gain(self, amount: f64) -> Self

Source

pub fn channel_complete_extend_aura( self, aura: LocalAuraIdx, amount_ms: u32, ) -> Self

Extend an aura once after the channel’s final scheduled tick.

Source

pub fn channel_gcd_on_start(self, on_start: bool) -> Self

Override whether the GCD triggers at channel start. Defaults to true.

Source

pub(crate) fn channel_tick_source(self, spell_id: u32) -> Self

Source§

impl SpellDefinitionDraft

Source

pub fn cooldown(self, secs: f64) -> Self

Source

pub fn charges(self, max: u8, recharge_secs: f64) -> Self

Source

pub fn hasted_cooldown(self) -> Self

Scale this spell’s cooldown or charge recharge with the actor’s haste.

Source

pub fn unhasted_cooldown(self) -> Self

Keep this spell’s cooldown or charge recharge on wall-clock time.

Source

pub fn gcd_haste_type(self, haste_type: GcdHasteType) -> Self

Source

pub fn start_recovery_category( self, category: Option<CooldownCategoryId>, ) -> Self

Applies the DBC start-recovery bucket.

Source

pub fn cooldown_categories( self, cooldown: Option<CooldownCategoryId>, category_cooldown_secs: f64, charge: Option<CooldownCategoryId>, ) -> Self

Source

pub fn reduces_cd(self, target: LocalSpellIdx, amount_ms: u32) -> Self

Source

pub fn reduces_cd_chance( self, target: LocalSpellIdx, amount_ms: u32, chance: f64, ) -> Self

Source

pub fn resets_cd_while(self, target: LocalSpellIdx, aura: LocalAuraIdx) -> Self

Source§

impl SpellDefinitionDraft

Source

pub fn damage_flat(self, amount: f64) -> Self

Source

pub fn damage_ap(self, coef: f64, flags: DamageFlags) -> Self

Source

pub fn damage_ap_typed( self, coef: f64, flags: DamageFlags, ap_type: WeaponApType, ) -> Self

Source

pub fn damage_sp(self, coef: f64, flags: DamageFlags) -> Self

Source

pub fn damage_auto(self, def: ResolvedDamageDef) -> Result<Self, BuilderError>

Applies a resolved data-driven damage definition.

§Errors

Returns an error when the resolved damage kind has no builder representation.

Source

pub fn without_data_damage(self) -> Self

Suppress damage inferred by Self::apply_base_from_data.

Source

pub fn without_primary_data_damage(self) -> Self

Suppress only the parent’s inferred payload while retaining DBC trigger-child damage.

Source

pub(crate) fn damage_effect(self, spell_id: u32, effect_index: u8) -> Self

Source§

impl SpellDefinitionDraft

Source

pub fn new(_name: &str, _id: u32) -> Self

Source

pub fn usable_while_moving(self) -> Self

Source

pub fn guaranteed_crit(self) -> Self

Makes every hit of this spell critical.

Source

pub fn usable_while_casting(self) -> Self

Source

pub fn targets_player(self) -> Self

Cast without an explicit target payload.

Source

pub fn requires_stealth(self) -> Self

Source

pub const fn requires_behind_target(self) -> Self

Require the player to be behind the current target.

Source

pub fn cast_time(self, ms: u32) -> Self

Source

pub fn max_empower_when_aura(self, aura_id: u32) -> Self

Make an empower instant and release at its DBC maximum rank while aura_id is active. The one-shot aura is consumed by the completed empower cast.

Source

pub fn travel_time(self, ms: u32) -> Self

Source

pub fn gcd(self, ms: u32) -> Self

Source

pub fn extends_aura(self, aura: LocalAuraIdx, amount_ms: u32) -> Self

Source

pub fn applies_aura(self, aura: LocalAuraIdx) -> Self

Source

pub fn applies_inferred_aura( self, aura: LocalAuraIdx, aura_spell_id: u32, ) -> Self

Applies a name-matched aura unless the data says this spell requires it instead.

A spell and its usability requirement often share a display name. Whirling Dragon Punch 152175 names 196742 as its SpellAuraRestrictions.CasterAuraSpell. Inferring application from the shared name would apply the very aura the cast consumes. The requirement stated in the data therefore wins over the inference.

Source

pub fn applies_aura_id(self, aura_id: u32) -> Self

Apply the aura with this game id on cast; resolved to its registered local index.

Source

pub fn on_cast(self, hook: CastHookFn) -> Self

Source

pub fn trigger_program_predicate( self, effect_index: u8, predicate: fn(&HookCtx<'_>) -> bool, ) -> Self

Gate one source effect’s complete DBC trigger program with content-owned runtime logic.

Source

pub fn on_empower_release( self, hook: fn(_: &HookCtx<'_>, rank: u8) -> EmpowerReleaseAdjustment, ) -> Self

Register a rank-aware driver that adjusts an empower spell’s release payload.

Source

pub fn pet(self) -> Self

Source

pub fn no_stealth_break(self) -> Self

Source§

impl SpellDefinitionDraft

Source

pub(crate) fn finalize(self, name: String, id: u32) -> BuilderSpellDef

Source§

impl SpellDefinitionDraft

Source

pub fn requires_aura_at_min_stacks(self, aura_id: u32, min_stacks: u8) -> Self

Gate this spell on aura_id being active with at least min_stacks stacks (aura_id = 0 clears).

Source

pub fn cost_free_when_aura(self, aura_id: u32) -> Self

Bypass all resource costs while aura_id is active (aura_id = 0 clears).

Source

pub fn consume_aura_on_cast(self, aura_id: u32) -> Self

Consume one stack of aura_id after a successful cast.

Source

pub fn cooldown_bypass_when_aura(self, aura_id: u32) -> Self

Do not start this spell’s cooldown while aura_id is active.

Source

pub fn execute_below_pct(self, percent: f64) -> Self

Gate castability on the target being at or below percent health.

Source

pub fn instant_when_aura(self, aura_id: u32) -> Self

Make this spell instant while aura_id is active.

Source

pub fn override_shares_base_cooldown(self) -> Self

Make an action replacement share the requested action’s cooldown.

Source

pub fn override_preserves_aura(self) -> Self

Keep a stance/form aura active when it selects a replacement action.

Source

pub fn overridden_by(self, spell_id: u32, aura_id: u32) -> Self

Replace this action with spell_id while aura_id is active.

Source

pub fn override_at_min_stacks(self, min_stacks: u8) -> Self

Replace this action only when the controlling aura reaches min_stacks.

Source§

impl SpellDefinitionDraft

Source

pub fn cost(self, amount: f64) -> Self

Source

pub fn cost_percent_of_base(self, percent: f64) -> Self

Charge a percentage of the actor’s configured base primary-resource maximum.

Source

pub fn cost_percent_of_maximum(self, percent: f64) -> Self

Charge a percentage of the actor’s current modified primary-resource maximum.

Source

pub fn health_cost(self, amount: f64, percent_of_maximum: f64) -> Self

Pay a flat amount plus a percent of caster maximum health when the spell is cast.

Source

pub fn health_optional_cost(self, amount: f64, percent_of_maximum: f64) -> Self

Optionally spend flat health plus a percentage of caster maximum health.

Source

pub fn gain(self, amount: f64) -> Self

Source

pub fn secondary_cost(self, amount: f64) -> Self

Source

pub fn secondary_gain(self, amount: f64) -> Self

Source

pub fn additional_resource_gain(self, amount: f64) -> Self

Source

pub(super) fn optional_cost(self, amount: f64) -> Self

Source

pub(super) fn secondary_optional_cost(self, amount: f64) -> Self

Trait Implementations§

Source§

impl Debug for SpellDefinitionDraft

Source§

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

Formats the value using the given formatter. 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.

§

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> SpecConfig for T
where T: Any + Debug + Send,

Source§

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

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

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