pub struct GameplayCatalog { /* private fields */ }Expand description
The validated gameplay dataset and its lookup indexes.
Implementations§
Source§impl GameplayCatalog
impl GameplayCatalog
pub fn new( identity: GameplayDatasetIdentity, heroes: Vec<Hero>, ) -> Result<Self, GameplayDataError>
pub fn identity(&self) -> &GameplayDatasetIdentity
pub fn heroes(&self) -> &[Hero]
pub fn hero(&self, id: &HeroId) -> Option<&Hero>
pub fn hero_by_id(&self, id: impl AsRef<str>) -> Option<&Hero>
pub fn ability( &self, reference: &AbilityRef, ) -> Result<&Ability, AbilityLookupError>
pub fn find_abilities_by_keyword(&self, keyword: &str) -> Vec<(&Hero, &Ability)>
Source§impl GameplayCatalog
impl GameplayCatalog
pub fn query(&self) -> GameplayQuery<'_>
Trait Implementations§
Source§impl Clone for GameplayCatalog
impl Clone for GameplayCatalog
Source§fn clone(&self) -> GameplayCatalog
fn clone(&self) -> GameplayCatalog
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 moreAuto Trait Implementations§
impl Freeze for GameplayCatalog
impl RefUnwindSafe for GameplayCatalog
impl Send for GameplayCatalog
impl Sync for GameplayCatalog
impl Unpin for GameplayCatalog
impl UnsafeUnpin for GameplayCatalog
impl UnwindSafe for GameplayCatalog
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