pub trait RepositoryRootReader: DataResolver + Sync {
// Required methods
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 Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// 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 Self: 'async_trait,
'life0: 'async_trait,
'life1: '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 Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn fetch_release<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ReleaseFile<'static>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn fetch_inrelease_or_release<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
inrelease_path: &'life1 str,
release_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ReleaseFile<'static>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: '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 Self: 'async_trait,
'fetch: 'async_trait,
'life0: '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 Self: 'async_trait,
'fetch: 'async_trait,
'life0: '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 Self: 'async_trait,
'fetch: 'async_trait,
'life0: '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§
Sourcefn 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
Self: 'async_trait,
'life0: 'async_trait,
'life1: '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
Self: 'async_trait,
'life0: 'async_trait,
'life1: '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§
Sourcefn release_reader<'life0, 'life1, 'async_trait>(
&'life0 self,
distribution: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ReleaseReader>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: '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
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Obtain a ReleaseReader for a given distribution.
This assumes either an InRelease or Release file is located in dists/{distribution}/.
This is the case for most repositories.
Sourcefn fetch_inrelease<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ReleaseFile<'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: '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
Self: 'async_trait,
'life0: 'async_trait,
'life1: '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.
Sourcefn fetch_release<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ReleaseFile<'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_release<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ReleaseFile<'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch and parse an Release file at the relative path specified.
path is typically a value like dists/<distribution>/Release. e.g.
dists/bullseye/Release.
The default implementation of this trait should be sufficient for most types.
Sourcefn fetch_inrelease_or_release<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
inrelease_path: &'life1 str,
release_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ReleaseFile<'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fetch_inrelease_or_release<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
inrelease_path: &'life1 str,
release_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ReleaseFile<'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Fetch and parse either an InRelease or Release file at the relative path specified.
First attempt to use the more modern InRelease file, fall back to Release
The default implementation of this trait should be sufficient for most types.
Sourcefn 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
Self: 'async_trait,
'fetch: 'async_trait,
'life0: '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
Self: 'async_trait,
'fetch: 'async_trait,
'life0: 'async_trait,
Fetch a binary package given a BinaryPackageFetch instruction.
Returns a generic AsyncRead to obtain the raw file content.
Sourcefn 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
Self: 'async_trait,
'fetch: 'async_trait,
'life0: '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
Self: 'async_trait,
'fetch: 'async_trait,
'life0: '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.
Sourcefn 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
Self: 'async_trait,
'fetch: 'async_trait,
'life0: '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
Self: 'async_trait,
'fetch: 'async_trait,
'life0: 'async_trait,
Fetch a source package file given a SourcePackageFetch instruction.
Returns a generic AsyncRead to obtain the raw file content.