pub trait RepositoryRootReader: DataResolver + Sync {
fn url(&self) -> Result<Url>;
fn release_reader_with_distribution_path<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ReleaseReader>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn release_reader<'life0, 'life1, 'async_trait>(
&'life0 self,
distribution: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ReleaseReader>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
{ ... }
fn fetch_inrelease<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<ReleaseFile<'static>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
{ ... }
fn fetch_binary_package_generic<'fetch, 'life0, 'async_trait>(
&'life0 self,
fetch: BinaryPackageFetch<'fetch>
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn AsyncRead + Send>>>> + Send + 'async_trait>>
where
'fetch: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn fetch_binary_package_deb_reader<'fetch, 'life0, 'async_trait>(
&'life0 self,
fetch: BinaryPackageFetch<'fetch>
) -> Pin<Box<dyn Future<Output = Result<BinaryPackageReader<Cursor<Vec<u8>>>>> + Send + 'async_trait>>
where
'fetch: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn fetch_source_package_generic<'fetch, 'life0, 'async_trait>(
&'life0 self,
fetch: SourcePackageFetch<'fetch>
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn AsyncRead + Send>>>> + Send + 'async_trait>>
where
'fetch: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
}Expand description
Debian repository reader bound to the root of the repository.
This trait facilitates access to pool as well as to multiple releases within the repository.
Required methods
fn release_reader_with_distribution_path<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ReleaseReader>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn release_reader_with_distribution_path<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ReleaseReader>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Obtain a ReleaseReader given a distribution path.
Typically distributions exist at dists/<distribution>/. However, this may not
always be the case. This method allows explicitly passing in the relative path
holding the InRelease file.
Provided methods
fn release_reader<'life0, 'life1, 'async_trait>(
&'life0 self,
distribution: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ReleaseReader>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn release_reader<'life0, 'life1, 'async_trait>(
&'life0 self,
distribution: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ReleaseReader>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Obtain a ReleaseReader for a given distribution.
This assumes the InRelease file is located in dists/{distribution}/. This is the case
for most repositories.
fn fetch_inrelease<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<ReleaseFile<'static>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn fetch_inrelease<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<ReleaseFile<'static>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Fetch and parse an InRelease file at the relative path specified.
path is typically a value like dists/<distribution>/InRelease. e.g.
dists/bullseye/InRelease.
The default implementation of this trait should be sufficient for most types.
Fetch a binary package given a BinaryPackageFetch instruction.
Returns a generic [AsyncRead] to obtain the raw file content.
fn fetch_binary_package_deb_reader<'fetch, 'life0, 'async_trait>(
&'life0 self,
fetch: BinaryPackageFetch<'fetch>
) -> Pin<Box<dyn Future<Output = Result<BinaryPackageReader<Cursor<Vec<u8>>>>> + Send + 'async_trait>> where
'fetch: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn fetch_binary_package_deb_reader<'fetch, 'life0, 'async_trait>(
&'life0 self,
fetch: BinaryPackageFetch<'fetch>
) -> Pin<Box<dyn Future<Output = Result<BinaryPackageReader<Cursor<Vec<u8>>>>> + Send + 'async_trait>> where
'fetch: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Fetch a binary package given a BinaryPackageFetch instruction.
Returns a BinaryPackageReader capable of parsing the package.
Due to limitations in BinaryPackageReader, the entire package content is buffered in memory and isn’t read lazily.
Fetch a source package file given a SourcePackageFetch instruction.
Returns a generic [AsyncRead] to obtain the raw file content.