pub trait SkillSource: Send + Sync {
// Required methods
fn search(
&self,
query: &str,
cursor: Option<&str>,
) -> Result<SkillSearchPage>;
fn versions(&self, skill_id: &str) -> Result<Vec<SkillVersion>>;
fn download(
&self,
skill_id: &str,
version: &str,
) -> Result<Box<dyn Read + Send>>;
}Expand description
A blocking catalog adapter. A desktop caller runs these calls off the UI thread.
An adapter owns its transport and credentials. IDs, versions and cursors must be passed to the provider as data. They are not local paths.
Required Methods§
Sourcefn search(&self, query: &str, cursor: Option<&str>) -> Result<SkillSearchPage>
fn search(&self, query: &str, cursor: Option<&str>) -> Result<SkillSearchPage>
Search the provider and return one bounded page.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".