Trait MetadataReader

Source
pub trait MetadataReader: DataResolver + Sync {
    // Required methods
    fn url(&self) -> Result<Url>;
    fn root_relative_path(&self) -> &str;
    fn repomd(&self) -> &RepoMd;

    // Provided methods
    fn fetch_data_file<'slf>(
        &'slf self,
        data: &'slf RepoMdData,
    ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn AsyncRead + Send>>>> + Send + 'slf>> { ... }
    fn primary_packages(
        &self,
    ) -> Pin<Box<dyn Future<Output = Result<Primary>> + Send + '_>> { ... }
}
Expand description

A read-only interface for metadata in an RPM repository.

This essentially provides methods for retrieving and parsing content from the repodata directory.

Required Methods§

Source

fn url(&self) -> Result<Url>

Obtain the base URL to which this instance is bound.

Source

fn root_relative_path(&self) -> &str

Obtain the path relative to the repository root this instance is bound to.

Source

fn repomd(&self) -> &RepoMd

Obtain the raw parsed repomd.xml data structure.

Provided Methods§

Source

fn fetch_data_file<'slf>( &'slf self, data: &'slf RepoMdData, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn AsyncRead + Send>>>> + Send + 'slf>>

Source

fn primary_packages( &self, ) -> Pin<Box<dyn Future<Output = Result<Primary>> + Send + '_>>

Implementors§