pub struct SkillRegistry { /* private fields */ }Expand description
A registry of loaded skills with tag and trigger indices.
Implementations§
Source§impl SkillRegistry
impl SkillRegistry
Sourcepub fn add(&mut self, skill: Skill, tier: SkillTier)
pub fn add(&mut self, skill: Skill, tier: SkillTier)
Add a skill to the registry with the given tier.
Find skills matching any of the given tags, sorted by tier (desc) then priority (desc).
Sourcepub fn find_by_trigger(&self, query: &str) -> Vec<&Skill>
pub fn find_by_trigger(&self, query: &str) -> Vec<&Skill>
Find skills whose trigger keywords match the query (case-insensitive).
Trait Implementations§
Source§impl Clone for SkillRegistry
impl Clone for SkillRegistry
Source§fn clone(&self) -> SkillRegistry
fn clone(&self) -> SkillRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SkillRegistry
impl Debug for SkillRegistry
Auto Trait Implementations§
impl Freeze for SkillRegistry
impl RefUnwindSafe for SkillRegistry
impl Send for SkillRegistry
impl Sync for SkillRegistry
impl Unpin for SkillRegistry
impl UnsafeUnpin for SkillRegistry
impl UnwindSafe for SkillRegistry
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