pub struct PackageInfoV1 {Show 19 fields
pub pkgname: Name,
pub pkgbase: Name,
pub pkgver: FullVersion,
pub pkgdesc: PackageDescription,
pub url: Url,
pub builddate: BuildDate,
pub packager: Packager,
pub size: InstalledSize,
pub arch: Architecture,
pub license: Vec<License>,
pub replaces: Vec<PackageRelation>,
pub group: Vec<Group>,
pub conflict: Vec<PackageRelation>,
pub provides: Vec<RelationOrSoname>,
pub backup: Vec<Backup>,
pub depend: Vec<RelationOrSoname>,
pub optdepend: Vec<OptionalDependency>,
pub makedepend: Vec<PackageRelation>,
pub checkdepend: Vec<PackageRelation>,
}Expand description
PKGINFO version 1
PackageInfoV1 is (exclusively) compatible with data following the first specification of the
PKGINFO file.
§Examples
use std::str::FromStr;
use alpm_pkginfo::PackageInfoV1;
let pkginfo_data = r#"pkgname = example
pkgbase = example
pkgver = 1:1.0.0-1
pkgdesc = A project that does something
url = https://example.org/
builddate = 1729181726
packager = John Doe <john@example.org>
size = 181849963
arch = any
license = GPL-3.0-or-later
license = LGPL-3.0-or-later
replaces = other-package>0.9.0-3
group = package-group
group = other-package-group
conflict = conflicting-package<1.0.0
conflict = other-conflicting-package<1.0.0
provides = some-component
provides = some-other-component=1:1.0.0-1
provides = libexample.so=1-64
provides = libunversionedexample.so=libunversionedexample.so-64
provides = lib:libexample.so.1
backup = etc/example/config.toml
backup = etc/example/other-config.txt
depend = glibc
depend = gcc-libs
depend = libother.so=0-64
depend = libunversioned.so=libunversioned.so-64
depend = lib:libother.so.0
optdepend = python: for special-python-script.py
optdepend = ruby: for special-ruby-script.rb
makedepend = cmake
makedepend = python-sphinx
checkdepend = extra-test-tool
checkdepend = other-extra-test-tool"#;
let pkginfo = PackageInfoV1::from_str(pkginfo_data)?;
assert_eq!(pkginfo.to_string(), pkginfo_data);Fields§
§pkgname: NameThe name of the package.
pkgbase: NameThe base name of the package.
pkgver: FullVersionThe version of the package.
pkgdesc: PackageDescriptionThe description of the package.
url: UrlThe URL of the package.
builddate: BuildDateThe build date of the package.
packager: PackagerThe packager of the package.
size: InstalledSizeThe size of the package.
arch: ArchitectureThe architecture of the package.
license: Vec<License>The licenses of the package.
replaces: Vec<PackageRelation>The packages this package replaces.
group: Vec<Group>The groups this package belongs to.
conflict: Vec<PackageRelation>The packages this package conflicts with.
provides: Vec<RelationOrSoname>The packages this package provides.
backup: Vec<Backup>The backup files of the package.
depend: Vec<RelationOrSoname>The dependencies of the package.
optdepend: Vec<OptionalDependency>The optional dependencies of the package.
makedepend: Vec<PackageRelation>The packages required to build this package.
checkdepend: Vec<PackageRelation>The packages this package is checked with.
Trait Implementations§
Source§impl Clone for PackageInfoV1
impl Clone for PackageInfoV1
Source§fn clone(&self) -> PackageInfoV1
fn clone(&self) -> PackageInfoV1
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PackageInfoV1
impl Debug for PackageInfoV1
Source§impl<'de> Deserialize<'de> for PackageInfoV1
impl<'de> Deserialize<'de> for PackageInfoV1
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PackageInfoV1
impl Display for PackageInfoV1
Source§impl FromStr for PackageInfoV1
impl FromStr for PackageInfoV1
Source§impl PartialEq for PackageInfoV1
impl PartialEq for PackageInfoV1
Source§impl Serialize for PackageInfoV1
impl Serialize for PackageInfoV1
impl StructuralPartialEq for PackageInfoV1
Auto Trait Implementations§
impl Freeze for PackageInfoV1
impl RefUnwindSafe for PackageInfoV1
impl Send for PackageInfoV1
impl Sync for PackageInfoV1
impl Unpin for PackageInfoV1
impl UnwindSafe for PackageInfoV1
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more