pub struct SkillIndex { /* private fields */ }Expand description
Semantic skill index: retrieve agents by relevance instead of enumerating every card (P2-9).
Relevance is a bag-of-words cosine similarity over skill descriptions and the query. This is deliberately dependency-free and deterministic — a fleet that later adopts real embeddings can swap the scorer behind the same API.
Implementations§
Source§impl SkillIndex
impl SkillIndex
Sourcepub fn with_entry(self, entry: SkillEntry) -> Self
pub fn with_entry(self, entry: SkillEntry) -> Self
Index a single skill/agent pair.
Sourcepub fn index_card(&mut self, card: &AgentCard)
pub fn index_card(&mut self, card: &AgentCard)
Index every skill advertised on an agent card.
Sourcepub fn entries(&self) -> &[SkillEntry]
pub fn entries(&self) -> &[SkillEntry]
The indexed entries, in insertion order.
Trait Implementations§
Source§impl Debug for SkillIndex
impl Debug for SkillIndex
Source§impl Default for SkillIndex
impl Default for SkillIndex
Source§fn default() -> SkillIndex
fn default() -> SkillIndex
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SkillIndex
impl RefUnwindSafe for SkillIndex
impl Send for SkillIndex
impl Sync for SkillIndex
impl Unpin for SkillIndex
impl UnsafeUnpin for SkillIndex
impl UnwindSafe for SkillIndex
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