pub struct Package { /* private fields */ }Expand description
These fields contain information about an installed software package. It contains general information about a package, such as name, version or size. It also contains installation details, such as time or location.
Implementations§
Source§impl Package
impl Package
Sourcepub fn get_version(&self) -> Option<&String>
pub fn get_version(&self) -> Option<&String>
Package version
Sourcepub fn set_version(&mut self, version_arg: String)
pub fn set_version(&mut self, version_arg: String)
Sourcepub fn get_build_version(&self) -> Option<&String>
pub fn get_build_version(&self) -> Option<&String>
Additional information about the build version of the installed package.
For example use the commit SHA of a non-released package.
Sourcepub fn set_build_version(&mut self, build_version_arg: String)
pub fn set_build_version(&mut self, build_version_arg: String)
Additional information about the build version of the installed package.
For example use the commit SHA of a non-released package.
§Example
36f4f7e89dd61b0988b12ee000b98966867710cd
Sourcepub fn get_description(&self) -> Option<&String>
pub fn get_description(&self) -> Option<&String>
Description of the package.
Sourcepub fn set_description(&mut self, description_arg: String)
pub fn set_description(&mut self, description_arg: String)
Description of the package.
§Example
Open source programming language to build simple/reliable/efficient software.
Sourcepub fn get_installed(&self) -> Option<&Timestamp>
pub fn get_installed(&self) -> Option<&Timestamp>
Time when package was installed.
Sourcepub fn set_installed(&mut self, installed_arg: Timestamp)
pub fn set_installed(&mut self, installed_arg: Timestamp)
Time when package was installed.
Sourcepub fn get_architecture(&self) -> Option<&String>
pub fn get_architecture(&self) -> Option<&String>
Package architecture.
Sourcepub fn set_architecture(&mut self, architecture_arg: String)
pub fn set_architecture(&mut self, architecture_arg: String)
Sourcepub fn get_checksum(&self) -> Option<&String>
pub fn get_checksum(&self) -> Option<&String>
Checksum of the installed package for verification.
Sourcepub fn set_checksum(&mut self, checksum_arg: String)
pub fn set_checksum(&mut self, checksum_arg: String)
Sourcepub fn get_install_scope(&self) -> Option<&String>
pub fn get_install_scope(&self) -> Option<&String>
Indicating how the package was installed, e.g. user-local, global.
Sourcepub fn set_install_scope(&mut self, install_scope_arg: String)
pub fn set_install_scope(&mut self, install_scope_arg: String)
Sourcepub fn get_license(&self) -> Option<&String>
pub fn get_license(&self) -> Option<&String>
License under which the package was released.
Use a short name, e.g. the license identifier from SPDX License List where possible (https://spdx.org/licenses/).
Sourcepub fn set_license(&mut self, license_arg: String)
pub fn set_license(&mut self, license_arg: String)
License under which the package was released.
Use a short name, e.g. the license identifier from SPDX License List where possible (https://spdx.org/licenses/).
§Example
Apache License 2.0
Sourcepub fn get_reference(&self) -> Option<&String>
pub fn get_reference(&self) -> Option<&String>
Home page or reference URL of the software in this package, if available.
Sourcepub fn set_reference(&mut self, reference_arg: String)
pub fn set_reference(&mut self, reference_arg: String)
Home page or reference URL of the software in this package, if available.
§Example
https://golang.org