pub struct Package {
pub package: String,
pub version: Version,
pub architecture: String,
pub installed: Bool,
pub hold: Bool,
pub id: String,
pub pin: u32,
pub candidate: Bool,
pub automatic: Bool,
pub depends: Vec<Dependency>,
pub conflicts: Vec<VersionSet>,
pub extra: HashMap<String, String>,
}Expand description
Describes an installed or available package in the package universe.
Fields§
§package: StringThe name of the package.
version: VersionThe version of the package.
architecture: StringA string representing the architecture(s) the package supports.
installed: Bool§hold: Bool§id: StringThe unique package identifier, according to APT.
pin: u32The package pin value, according to APT policy.
candidate: BoolIf set to Bool::YES, the package is the APT candidate for installation among all
available packages with the same name and architecture. Defaults to Bool::NO.
automatic: BoolIf set to Bool::YES, the package is marked by APT as automatic installed.
depends: Vec<Dependency>Specifies the absolute dependencies of the package. See the Debian Policy Manual
on the Depends field for more information.
conflicts: Vec<VersionSet>Specifies packages that conflict with this package. See the Debian Policy Manual
on the Conflicts field for more information.
extra: HashMap<String, String>Contains other optional fields that can be contained in a Package stanza.
Implementations§
Source§impl Package
impl Package
Sourcepub fn to_install(&self) -> Install
pub fn to_install(&self) -> Install
Returns an Install stanza that can be used to tell APT to install this package.
Sourcepub fn to_remove(&self) -> Remove
pub fn to_remove(&self) -> Remove
Returns a Remove stanza that can be used to tell APT to remove this package.
Sourcepub fn to_autoremove(&self) -> Autoremove
pub fn to_autoremove(&self) -> Autoremove
Returns an Autoremove stanza that can be used to tell APT that this package can be
autoremoved.