ManagedCatalog

Trait ManagedCatalog 

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

Source

fn clear_all(&self) -> Result<(), String>

Clears all locally stored modules, resetting the local catalog to an empty state

Source

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

Source

fn remove(&self, descriptor: &ModuleDescriptor) -> Result<(), String>

Remove a specific module from the catalog

Provided Methods§

Source

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

Implementors§