pub struct GameplayQuery<'a> { /* private fields */ }Implementations§
Source§impl<'a> GameplayQuery<'a>
impl<'a> GameplayQuery<'a>
pub fn heroes(&self) -> &'a [Hero]
pub fn hero( &self, hero: impl AsRef<str>, ) -> Result<&'a Hero, GameplayQueryError>
pub fn kit( &self, hero: impl AsRef<str>, ) -> Result<Vec<&'a Ability>, GameplayQueryError>
pub fn slot( &self, hero: impl AsRef<str>, slot: impl AsRef<str>, ) -> Result<Vec<&'a Ability>, GameplayQueryError>
pub fn ability( &self, hero: impl AsRef<str>, slot: impl AsRef<str>, ) -> Result<&'a Ability, GameplayQueryError>
pub fn ability_ref( &self, reference: &AbilityRef, ) -> Result<&'a Ability, GameplayQueryError>
pub fn slot_ability( &self, hero: impl AsRef<str>, slot: impl AsRef<str>, ) -> Result<&'a Ability, GameplayQueryError>
pub fn variant( &self, hero: impl AsRef<str>, slot: impl AsRef<str>, variant: impl AsRef<str>, ) -> Result<&'a Ability, GameplayQueryError>
pub fn keyword(&self, keyword: impl AsRef<str>) -> Vec<AbilityMatch<'a>>
pub fn hero_stat( &self, hero: impl AsRef<str>, stat: impl AsRef<str>, ) -> Result<&'a Fact<StatValue>, GameplayQueryError>
pub fn stat( &self, hero: impl AsRef<str>, slot: impl AsRef<str>, variant: Option<&AbilityVariant>, stat: impl AsRef<str>, ) -> Result<&'a Fact<StatValue>, GameplayQueryError>
pub fn quantity_stat( &self, hero: impl AsRef<str>, slot: impl AsRef<str>, variant: Option<&AbilityVariant>, stat: impl AsRef<str>, ) -> Result<&'a Quantity, GameplayQueryError>
pub fn ability_name( &self, hero: impl AsRef<str>, slot: impl AsRef<str>, variant: Option<&AbilityVariant>, locale: impl AsRef<str>, ) -> Result<&'a str, AbilityNameResolutionError>
pub fn resolve_ability_name( &self, hero: impl AsRef<str>, locale: impl AsRef<str>, name: impl AsRef<str>, ) -> Result<AbilityRef, AbilityNameResolutionError>
pub fn cooldown( &self, reference: &AbilityRef, ) -> Result<&'a Quantity, CooldownError>
pub fn effective_cooldown( &self, reference: &AbilityRef, percentage: CooldownPercentage, ) -> Result<Quantity, CooldownError>
pub fn required_cooldown_percentage( &self, reference: &AbilityRef, target: &Quantity, ) -> Result<CooldownPercentage, CooldownError>
Trait Implementations§
Source§impl<'a> Clone for GameplayQuery<'a>
impl<'a> Clone for GameplayQuery<'a>
Source§fn clone(&self) -> GameplayQuery<'a>
fn clone(&self) -> GameplayQuery<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for GameplayQuery<'a>
Auto Trait Implementations§
impl<'a> Freeze for GameplayQuery<'a>
impl<'a> RefUnwindSafe for GameplayQuery<'a>
impl<'a> Send for GameplayQuery<'a>
impl<'a> Sync for GameplayQuery<'a>
impl<'a> Unpin for GameplayQuery<'a>
impl<'a> UnsafeUnpin for GameplayQuery<'a>
impl<'a> UnwindSafe for GameplayQuery<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more