pub trait DebPackageReference<'cf> {
// Required methods
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§
Sourcefn deb_size_bytes(&self) -> Result<u64>
fn deb_size_bytes(&self) -> Result<u64>
Obtain the size in bytes of the .deb file.
This becomes the Size field in Packages* control files.
Sourcefn deb_digest(&self, checksum: ChecksumType) -> Result<ContentDigest>
fn deb_digest(&self, checksum: ChecksumType) -> Result<ContentDigest>
Obtains the binary digest of this file given a checksum flavor.
Implementations can compute the digest at run-time or return a cached value.
Sourcefn deb_filename(&self) -> Result<String>
fn deb_filename(&self) -> Result<String>
Obtain the filename of this .deb.
This should be just the file name, without any directory components.
Sourcefn control_file_for_packages_index(
&self,
) -> Result<BinaryPackageControlFile<'cf>>
fn control_file_for_packages_index( &self, ) -> Result<BinaryPackageControlFile<'cf>>
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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".