BuildInfoV2

Struct BuildInfoV2 

Source
pub struct BuildInfoV2 {
Show 14 fields pub pkgname: Name, pub pkgbase: Name, pub pkgver: FullVersion, pub pkgarch: Architecture, pub pkgbuild_sha256sum: Checksum<Sha256>, pub packager: Packager, pub builddate: BuildDate, pub builddir: BuildDirectory, pub buildenv: Vec<BuildEnvironmentOption>, pub options: Vec<PackageOption>, pub installed: Vec<InstalledPackage>, pub startdir: StartDirectory, pub buildtool: BuildTool, pub buildtoolver: BuildToolVersion,
}
Expand description

BUILDINFO version 2

BuildInfoV2 is (exclusively) compatible with data following the v2 specification of the BUILDINFO file.

§Examples

use std::str::FromStr;

use alpm_buildinfo::BuildInfoV2;

let buildinfo_data = r#"format = 2
pkgname = foo
pkgbase = foo
pkgver = 1:1.0.0-1
pkgarch = any
pkgbuild_sha256sum = b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c
packager = Foobar McFooface <foobar@mcfooface.org>
builddate = 1
builddir = /build
startdir = /startdir/
buildtool = devtools
buildtoolver = 1:1.2.1-1-any
buildenv = ccache
buildenv = color
options = lto
options = !strip
installed = bar-1.2.3-1-any
installed = beh-2.2.3-4-any
"#;

let buildinfo = BuildInfoV2::from_str(buildinfo_data)?;
assert_eq!(buildinfo.to_string(), buildinfo_data);

Fields§

§pkgname: Name

The package name

§pkgbase: Name

The package base name

§pkgver: FullVersion

The package version

§pkgarch: Architecture

The package architecture

§pkgbuild_sha256sum: Checksum<Sha256>

The package build SHA-256 checksum

§packager: Packager

The packager

§builddate: BuildDate

The build date

§builddir: BuildDirectory

The build directory

§buildenv: Vec<BuildEnvironmentOption>

The build environment

§options: Vec<PackageOption>

The package options

§installed: Vec<InstalledPackage>

The installed packages

§startdir: StartDirectory

The start directory of the build process

§buildtool: BuildTool

The tool used for building the package

§buildtoolver: BuildToolVersion

The version of the build tool

Implementations§

Source§

impl BuildInfoV2

Source

fn format(&self) -> String

Used by serde_more to serialize the additional format field.

Trait Implementations§

Source§

impl Clone for BuildInfoV2

Source§

fn clone(&self) -> BuildInfoV2

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BuildInfoV2

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for BuildInfoV2

Source§

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 BuildInfoV2

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromStr for BuildInfoV2

Source§

fn from_str(input: &str) -> Result<BuildInfoV2, Self::Err>

Create a BuildInfoV2 from a &str

§Errors

Returns an Error if any of the fields in input can not be validated according to BuildInfoV2 or their respective own specification.

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

impl PartialEq for BuildInfoV2

Source§

fn eq(&self, other: &BuildInfoV2) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for BuildInfoV2

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for BuildInfoV2

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AnyEq for T
where T: Any + PartialEq,

§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,