Trait debian_packaging::repository::builder::DebPackageReference[][src]

pub trait DebPackageReference<'cf> {
    fn deb_size_bytes(&self) -> Result<u64>;
fn deb_digest(&self, checksum: ChecksumType) -> Result<ContentDigest>;
fn deb_filename(&self) -> Result<String>;
fn control_file_for_packages_index(
        &self
    ) -> Result<BinaryPackageControlFile<'cf>>; }
Expand description

Describes a reference to a .deb Debian package existing somewhere.

This trait is used as a generic way to refer to a .deb package, without implementations necessarily having immediate access to the full content/data of that .deb package.

Required methods

Obtain the size in bytes of the .deb file.

This becomes the Size field in Packages* control files.

Obtains the binary digest of this file given a checksum flavor.

Implementations can compute the digest at run-time or return a cached value.

Obtain the filename of this .deb.

This should be just the file name, without any directory components.

Obtain a BinaryPackageControlFile representing content for a Packages index file.

The returned content can come from a control file in a control.tar or from an existing Packages control file.

The control file must have at least Package, Version, and Architecture fields.

Implementors