pub trait ManagedCatalog: ModuleCatalog {
// Required methods
fn clear_all(&self) -> Result<(), String>;
fn fetch(
&self,
descriptor: &ModuleDescriptor,
update_mode: UpdateMode,
) -> Result<(), String>;
fn remove(&self, descriptor: &ModuleDescriptor) -> Result<(), String>;
// Provided method
fn fetch_newest_for_all(
&self,
update_mode: UpdateMode,
) -> Result<(), String> { ... }
}Required Methods§
Sourcefn clear_all(&self) -> Result<(), String>
fn clear_all(&self) -> Result<(), String>
Clears all locally stored modules, resetting the local catalog to an empty state
Sourcefn fetch(
&self,
descriptor: &ModuleDescriptor,
update_mode: UpdateMode,
) -> Result<(), String>
fn fetch( &self, descriptor: &ModuleDescriptor, update_mode: UpdateMode, ) -> Result<(), String>
Fetch a specific module from the UpstreamCatalog. Returns `Ok(())`` if the module already exists in the catalog
NOTE: This method will likely become async in the future
Provided Methods§
Sourcefn fetch_newest_for_all(&self, update_mode: UpdateMode) -> Result<(), String>
fn fetch_newest_for_all(&self, update_mode: UpdateMode) -> Result<(), String>
AKA “upgrade”. Fetches the newest version for each module that currently exists in the catalog
NOTE: This API will likely change in the future. See “NOTE FOR THE FUTURE” in comments
for ManagedCatalog