pub trait CatalogLoader: Send + Sync {
// Required method
fn load(&self) -> Result<ApiCatalog, CacheError>;
}Expand description
Trait for loading the OpenCode API catalog.
This trait enables dependency injection for catalog loading, allowing tests to provide mock implementations that don’t make network calls.
Required Methods§
Sourcefn load(&self) -> Result<ApiCatalog, CacheError>
fn load(&self) -> Result<ApiCatalog, CacheError>
Load the API catalog.
Returns the catalog or an error if loading fails.