Skip to main content

ResolvedGameDataEffectExt

Trait ResolvedGameDataEffectExt 

Source
pub trait ResolvedGameDataEffectExt {
    // Required methods
    fn effect_lookup(&self, effect: impl Into<EffectRef>) -> EffectLookup<'_>;
    fn require_effect_base_points(
        &self,
        effect: impl Into<EffectRef>,
    ) -> Result<f64, GameDataError>;
    fn require_effect_points_per_resource(
        &self,
        effect: impl Into<EffectRef>,
    ) -> Result<f64, GameDataError>;
    fn resolved_effect_points(
        &self,
        effect: impl Into<EffectRef>,
        mastery_points: f64,
    ) -> f64;

    // Provided methods
    fn effect_base_points(&self, effect: impl Into<EffectRef>) -> f64 { ... }
    fn effect_percent(&self, effect: impl Into<EffectRef>) -> f64 { ... }
    fn effect_ap_coefficient(&self, effect: impl Into<EffectRef>) -> f64 { ... }
    fn effect_sp_coefficient(&self, effect: impl Into<EffectRef>) -> f64 { ... }
}
Expand description

Effect-coordinate access for code that has resolved data but no combat hook context.

Required Methods§

Source

fn effect_lookup(&self, effect: impl Into<EffectRef>) -> EffectLookup<'_>

Source

fn require_effect_base_points( &self, effect: impl Into<EffectRef>, ) -> Result<f64, GameDataError>

Resolve required base points while preserving the populated-data missing-effect error.

§Errors

Returns an error when populated data does not contain the requested effect.

Source

fn require_effect_points_per_resource( &self, effect: impl Into<EffectRef>, ) -> Result<f64, GameDataError>

Resolve required points-per-resource while preserving the populated-data missing-effect error.

§Errors

Returns an error when populated data does not contain the requested effect.

Source

fn resolved_effect_points( &self, effect: impl Into<EffectRef>, mastery_points: f64, ) -> f64

Provided Methods§

Source

fn effect_base_points(&self, effect: impl Into<EffectRef>) -> f64

Source

fn effect_percent(&self, effect: impl Into<EffectRef>) -> f64

Source

fn effect_ap_coefficient(&self, effect: impl Into<EffectRef>) -> f64

Source

fn effect_sp_coefficient(&self, effect: impl Into<EffectRef>) -> f64

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ResolvedGameDataEffectExt for ResolvedGameData

Source§

fn effect_lookup(&self, effect: impl Into<EffectRef>) -> EffectLookup<'_>

Source§

fn resolved_effect_points( &self, effect: impl Into<EffectRef>, mastery_points: f64, ) -> f64

Source§

fn require_effect_base_points( &self, effect: impl Into<EffectRef>, ) -> Result<f64, GameDataError>

Source§

fn require_effect_points_per_resource( &self, effect: impl Into<EffectRef>, ) -> Result<f64, GameDataError>

Implementors§