Struct debian_packaging::repository::copier::RepositoryCopier [−][src]
pub struct RepositoryCopier { /* fields omitted */ }
Expand description
Entity for copying Debian repository content.
Instances of this type can be used to copy select Debian repository content between a reader and a writer.
The file layout and content is preserved, so existing PGP signatures can be preserved. However, the copier does have the ability to selectively filter which files are copied. So the destination repository may reference content that doesn’t exist in that location.
Because repositories do not have a standardized mechanism for discovering dists/releases within, this type must be told which distributions to copy. Copying is performed 1 distribution at a time.
By default, instances copy all copyable content. Installer files are currently not supported. Incomplete copies for all other files is considered a bug and should be reported.
Various set_*
methods exist to control the copying behavior.
Implementations
Set an explicit list of components whose files to copy.
Set whether to copy non-installer binary packages.
Set a filter for architectures of non-installer binary packages to copy.
Binary packages for architectures not in this set will be ignored.
Set whether to copy installer binary packages.
pub fn set_installer_binary_packages_only_arches(
&mut self,
value: impl Iterator<Item = String>
)
pub fn set_installer_binary_packages_only_arches(
&mut self,
value: impl Iterator<Item = String>
)
Set a filter for architectures of installer binary packages to copy.
Binary packages for architectures not in this set will be ignored.
Set whether to copy sources package files.
pub async fn copy_from_config(
config: RepositoryCopierConfig,
max_copy_operations: usize,
progress_cb: &Option<Box<dyn Fn(PublishEvent) + Sync>>
) -> Result<()>
pub async fn copy_from_config(
config: RepositoryCopierConfig,
max_copy_operations: usize,
progress_cb: &Option<Box<dyn Fn(PublishEvent) + Sync>>
) -> Result<()>
Perform a copy operation as defined by a RepositoryCopierConfig.
pub async fn copy_distribution(
&self,
root_reader: &dyn RepositoryRootReader,
writer: &dyn RepositoryWriter,
distribution: &str,
max_copy_operations: usize,
progress_cb: &Option<Box<dyn Fn(PublishEvent) + Sync>>
) -> Result<()>
pub async fn copy_distribution(
&self,
root_reader: &dyn RepositoryRootReader,
writer: &dyn RepositoryWriter,
distribution: &str,
max_copy_operations: usize,
progress_cb: &Option<Box<dyn Fn(PublishEvent) + Sync>>
) -> Result<()>
Copy content for a given distribution given a distribution name.
This is a proxy for Self::copy_distribution_path() which simply passes
dists/{distribution}
as the path value. This is the standard layout for Debian
repositories.
pub async fn copy_distribution_path(
&self,
root_reader: &dyn RepositoryRootReader,
writer: &dyn RepositoryWriter,
distribution_path: &str,
max_copy_operations: usize,
progress_cb: &Option<Box<dyn Fn(PublishEvent) + Sync>>
) -> Result<()>
pub async fn copy_distribution_path(
&self,
root_reader: &dyn RepositoryRootReader,
writer: &dyn RepositoryWriter,
distribution_path: &str,
max_copy_operations: usize,
progress_cb: &Option<Box<dyn Fn(PublishEvent) + Sync>>
) -> Result<()>
Copy content for a given distribution at a path relative to the repository root.
The given distribution_path
is usually prefixed with dists/
. e.g. dists/bullseye
.
But it can be something else for non-standard repository layouts.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RepositoryCopier
impl Send for RepositoryCopier
impl Sync for RepositoryCopier
impl Unpin for RepositoryCopier
impl UnwindSafe for RepositoryCopier
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more