pub struct Package(/* private fields */);
Expand description
A package in the APT package manager.
Implementations§
Source§impl Package
impl Package
Sourcepub fn parse(text: &str) -> Parse<Package>
pub fn parse(text: &str) -> Parse<Package>
Parse package text, returning a Parse result
Note: This expects a single paragraph, not a full deb822 document
Sourcepub fn set_version(&mut self, version: Version)
pub fn set_version(&mut self, version: Version)
Set the version of the package.
Sourcepub fn installed_size(&self) -> Option<usize>
pub fn installed_size(&self) -> Option<usize>
Get the installed size of the package in bytes.
Sourcepub fn set_installed_size(&mut self, size: usize)
pub fn set_installed_size(&mut self, size: usize)
Set the installed size of the package in bytes.
Sourcepub fn maintainer(&self) -> Option<String>
pub fn maintainer(&self) -> Option<String>
Get the maintainer of the package.
Sourcepub fn set_maintainer(&mut self, maintainer: &str)
pub fn set_maintainer(&mut self, maintainer: &str)
Set the maintainer of the package.
Sourcepub fn architecture(&self) -> Option<String>
pub fn architecture(&self) -> Option<String>
Get the architecture of the package.
Sourcepub fn set_architecture(&mut self, arch: &str)
pub fn set_architecture(&mut self, arch: &str)
Set the architecture of the package.
Sourcepub fn set_depends(&mut self, relations: Relations)
pub fn set_depends(&mut self, relations: Relations)
Set the packages that this package depends on.
Sourcepub fn recommends(&self) -> Option<Relations>
pub fn recommends(&self) -> Option<Relations>
Get the packages that this package suggests.
Sourcepub fn set_recommends(&mut self, relations: Relations)
pub fn set_recommends(&mut self, relations: Relations)
Set the packages that this package recommends.
Sourcepub fn set_suggests(&mut self, relations: Relations)
pub fn set_suggests(&mut self, relations: Relations)
Set the packages that this package suggests.
Sourcepub fn set_enhances(&mut self, relations: Relations)
pub fn set_enhances(&mut self, relations: Relations)
Set the packages that this package enhances.
Sourcepub fn pre_depends(&self) -> Option<Relations>
pub fn pre_depends(&self) -> Option<Relations>
Get the relations that this package pre-depends on.
Sourcepub fn set_pre_depends(&mut self, relations: Relations)
pub fn set_pre_depends(&mut self, relations: Relations)
Set the relations that this package pre-depends on.
Sourcepub fn set_breaks(&mut self, relations: Relations)
pub fn set_breaks(&mut self, relations: Relations)
Set the relations that this package breaks.
Sourcepub fn conflicts(&self) -> Option<Relations>
pub fn conflicts(&self) -> Option<Relations>
Get the relations that this package conflicts with.
Sourcepub fn set_conflicts(&mut self, relations: Relations)
pub fn set_conflicts(&mut self, relations: Relations)
Set the relations that this package conflicts with.
Sourcepub fn set_replaces(&mut self, relations: Relations)
pub fn set_replaces(&mut self, relations: Relations)
Set the relations that this package replaces.
Sourcepub fn set_provides(&mut self, relations: Relations)
pub fn set_provides(&mut self, relations: Relations)
Set the relations that the package provides.
Sourcepub fn set_section(&mut self, section: &str)
pub fn set_section(&mut self, section: &str)
Set the section of the package.
Sourcepub fn set_priority(&mut self, priority: Priority)
pub fn set_priority(&mut self, priority: Priority)
Set the priority of the package.
Sourcepub fn description(&self) -> Option<String>
pub fn description(&self) -> Option<String>
Get the description of the package.
Sourcepub fn set_description(&mut self, description: &str)
pub fn set_description(&mut self, description: &str)
Set the description of the package.
Sourcepub fn set_homepage(&mut self, url: &Url)
pub fn set_homepage(&mut self, url: &Url)
Set the upstream homepage of the package.
Sourcepub fn set_source(&mut self, source: &str)
pub fn set_source(&mut self, source: &str)
Set the source of the package.
Sourcepub fn description_md5(&self) -> Option<String>
pub fn description_md5(&self) -> Option<String>
Get the MD5 checksum of the description.
Sourcepub fn set_description_md5(&mut self, md5: &str)
pub fn set_description_md5(&mut self, md5: &str)
Set the MD5 checksum of the description.
Get the tags of the package.
Set the tags of the package.
Sourcepub fn set_filename(&mut self, filename: &str)
pub fn set_filename(&mut self, filename: &str)
Set the filename of the package.
Sourcepub fn set_md5sum(&mut self, md5sum: &str)
pub fn set_md5sum(&mut self, md5sum: &str)
Set the MD5 checksum.
Sourcepub fn set_sha256(&mut self, sha256: &str)
pub fn set_sha256(&mut self, sha256: &str)
Set the SHA256 checksum.
Sourcepub fn multi_arch(&self) -> Option<MultiArch>
pub fn multi_arch(&self) -> Option<MultiArch>
Get the multi-arch field.
Sourcepub fn set_multi_arch(&mut self, arch: MultiArch)
pub fn set_multi_arch(&mut self, arch: MultiArch)
Set the multi-arch field.