Skip to main content

CatalogLoader

Trait CatalogLoader 

Source
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§

Source

fn load(&self) -> Result<ApiCatalog, CacheError>

Load the API catalog.

Returns the catalog or an error if loading fails.

Implementors§