pub struct SkillRegistry { /* private fields */ }Expand description
Registry of named Skills. Identical structure to ToolRegistry.
Implementations§
Source§impl SkillRegistry
impl SkillRegistry
pub fn new() -> Self
pub fn register(&self, skill: Arc<dyn Skill>)
pub fn get(&self, id: &str) -> Result<Arc<dyn Skill>, KernelError>
Sourcepub fn resolve_chain<I, S>(
&self,
ids: I,
) -> Result<Vec<Arc<dyn Skill>>, KernelError>
pub fn resolve_chain<I, S>( &self, ids: I, ) -> Result<Vec<Arc<dyn Skill>>, KernelError>
Resolve a list of skill ids in declared order. Errors on the first
missing id. Used by GenericAgent to build its skill chain at
construction.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
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 Default for SkillRegistry
impl Default for SkillRegistry
Source§fn default() -> SkillRegistry
fn default() -> SkillRegistry
Returns the “default value” for a type. Read more
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