Skip to main content

GameplayQuery

Struct GameplayQuery 

Source
pub struct GameplayQuery<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> GameplayQuery<'a>

Source

pub fn heroes(&self) -> &'a [Hero]

Source

pub fn hero( &self, hero: impl AsRef<str>, ) -> Result<&'a Hero, GameplayQueryError>

Source

pub fn kit( &self, hero: impl AsRef<str>, ) -> Result<Vec<&'a Ability>, GameplayQueryError>

Source

pub fn slot( &self, hero: impl AsRef<str>, slot: impl AsRef<str>, ) -> Result<Vec<&'a Ability>, GameplayQueryError>

Source

pub fn ability( &self, hero: impl AsRef<str>, slot: impl AsRef<str>, ) -> Result<&'a Ability, GameplayQueryError>

Source

pub fn ability_ref( &self, reference: &AbilityRef, ) -> Result<&'a Ability, GameplayQueryError>

Source

pub fn slot_ability( &self, hero: impl AsRef<str>, slot: impl AsRef<str>, ) -> Result<&'a Ability, GameplayQueryError>

Source

pub fn variant( &self, hero: impl AsRef<str>, slot: impl AsRef<str>, variant: impl AsRef<str>, ) -> Result<&'a Ability, GameplayQueryError>

Source

pub fn keyword(&self, keyword: impl AsRef<str>) -> Vec<AbilityMatch<'a>>

Source

pub fn hero_stat( &self, hero: impl AsRef<str>, stat: impl AsRef<str>, ) -> Result<&'a Fact<StatValue>, GameplayQueryError>

Source

pub fn stat( &self, hero: impl AsRef<str>, slot: impl AsRef<str>, variant: Option<&AbilityVariant>, stat: impl AsRef<str>, ) -> Result<&'a Fact<StatValue>, GameplayQueryError>

Source

pub fn quantity_stat( &self, hero: impl AsRef<str>, slot: impl AsRef<str>, variant: Option<&AbilityVariant>, stat: impl AsRef<str>, ) -> Result<&'a Quantity, GameplayQueryError>

Source

pub fn ability_name( &self, hero: impl AsRef<str>, slot: impl AsRef<str>, variant: Option<&AbilityVariant>, locale: impl AsRef<str>, ) -> Result<&'a str, AbilityNameResolutionError>

Source

pub fn resolve_ability_name( &self, hero: impl AsRef<str>, locale: impl AsRef<str>, name: impl AsRef<str>, ) -> Result<AbilityRef, AbilityNameResolutionError>

Source

pub fn cooldown( &self, reference: &AbilityRef, ) -> Result<&'a Quantity, CooldownError>

Source

pub fn effective_cooldown( &self, reference: &AbilityRef, percentage: CooldownPercentage, ) -> Result<Quantity, CooldownError>

Source

pub fn required_cooldown_percentage( &self, reference: &AbilityRef, target: &Quantity, ) -> Result<CooldownPercentage, CooldownError>

Trait Implementations§

Source§

impl<'a> Clone for GameplayQuery<'a>

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for GameplayQuery<'a>

Source§

impl<'a> Debug for GameplayQuery<'a>

Source§

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

Formats the value using the given formatter. Read more

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> 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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.