Skip to main content

SkillLoader

Struct SkillLoader 

Source
pub struct SkillLoader {
    pub skills: Vec<Skill>,
    pub search_paths: Vec<PathBuf>,
    pub discover_shared: bool,
    pub workspace_root: Option<PathBuf>,
    pub discovery_policy: SkillDiscoveryPolicy,
    pub discovery_warnings: Vec<SkillDiscoveryWarning>,
}

Fields§

§skills: Vec<Skill>§search_paths: Vec<PathBuf>§discover_shared: bool§workspace_root: Option<PathBuf>§discovery_policy: SkillDiscoveryPolicy§discovery_warnings: Vec<SkillDiscoveryWarning>

Implementations§

Source§

impl SkillLoader

Source

pub fn new() -> Self

Source

pub fn for_workspace(workspace_root: impl AsRef<Path>) -> Self

Source

pub fn for_workspace_with_options( workspace_root: impl AsRef<Path>, discover_shared: bool, ) -> Self

Source

pub fn for_workspace_with_home_and_options( workspace_root: impl AsRef<Path>, home: Option<PathBuf>, discover_shared: bool, ) -> Self

Constructs a loader with an explicit home directory for test injection.

When home is None, neither user-global nor shared roots are added. When home is Some(h), user-global (h/.talos/skills) and — if discover_shared is true — shared (h/.agents/skills) roots are added. This constructor never reads the HOME environment variable.

Source

pub fn for_workspace_with_discovery_policy( workspace_root: impl AsRef<Path>, discover_shared: bool, policy: SkillDiscoveryPolicy, ) -> Self

Source

pub fn discovery_warnings(&self) -> &[SkillDiscoveryWarning]

Source

pub fn discover(&mut self) -> Result<&Vec<Skill>>

Source

pub fn parse(path: &Path) -> Result<Skill>

Source

pub fn get_index(&self) -> Vec<SkillIndex>

Trait Implementations§

Source§

impl Default for SkillLoader

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> 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, 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, !>

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.