Skip to main content

Buildinfo

Struct Buildinfo 

Source
pub struct Buildinfo(/* private fields */);
Expand description

A buildinfo file

Implementations§

Source§

impl Buildinfo

Source

pub fn new() -> Self

Create a new source package

Source

pub fn parse(text: &str) -> Parse<Buildinfo>

Parse buildinfo text, returning a Parse result

Note: This expects a single paragraph, not a full deb822 document

Source

pub fn source(&self) -> Option<String>

Get the source name

Source

pub fn set_source(&mut self, package: &str)

Set the package name

Source

pub fn binaries(&self) -> Option<Vec<String>>

Get the binary package names

Source

pub fn set_binaries(&mut self, binaries: Vec<String>)

Set the binary package names

Source

pub fn version(&self) -> Option<Version>

Get the version of the package

Source

pub fn set_version(&mut self, version: Version)

Set the version of the package

Source

pub fn build_architecture(&self) -> Option<String>

Get the build architecture

Source

pub fn set_build_architecture(&mut self, arch: &str)

Set the build architecture

Source

pub fn architecture(&self) -> Option<String>

Get the architecture

Source

pub fn set_architecture(&mut self, arch: &str)

Set the architecture

Source

pub fn checksums_sha256(&self) -> Vec<Sha256Checksum>

Get Sha256 checksums

Source

pub fn set_checksums_sha256(&mut self, checksums: Vec<Sha256Checksum>)

Set Sha256 checksums

Source

pub fn checksums_sha1(&self) -> Vec<Sha1Checksum>

Get SHA1 checksums

Source

pub fn set_checksums_sha1(&mut self, checksums: Vec<Sha1Checksum>)

Set SHA1 checksums

Source

pub fn checksums_md5(&self) -> Vec<Md5Checksum>

Get MD5 checksums

Source

pub fn set_checksums_md5(&mut self, checksums: Vec<Md5Checksum>)

Set MD5 checksums

Source

pub fn build_origin(&self) -> Option<String>

Get the build origin

Source

pub fn set_build_origin(&mut self, origin: &str)

Set the build origin

Source

pub fn build_date(&self) -> Option<String>

Date on which the package was built

Source

pub fn set_build_date(&mut self, date: &str)

Set the build date

Source

pub fn build_tainted_by(&self) -> Option<Vec<String>>

Get the build tainted by field list

Source

pub fn set_build_tainted_by(&mut self, tainted_by: Vec<String>)

Set the build tainted by field list

Source

pub fn format(&self) -> Option<String>

Get the source format of the package

Source

pub fn set_format(&mut self, format: &str)

Set the format of the package

Source

pub fn build_path(&self) -> Option<String>

Get the build path

Source

pub fn set_build_path(&mut self, path: &str)

Set the build path

Source

pub fn environment(&self) -> Option<HashMap<String, String>>

Get the build environment

Source

pub fn set_environment(&mut self, env: HashMap<String, String>)

Set the build environment

Source

pub fn installed_build_depends(&self) -> Option<Relations>

Get the list of installed build depends

Source

pub fn set_installed_build_depends(&mut self, depends: Relations)

Set the list of installed build depends

Trait Implementations§

Source§

impl AstNode for Buildinfo

Source§

type Language = Lang

Source§

fn can_cast(kind: <Self::Language as Language>::Kind) -> bool

Source§

fn cast(syntax: SyntaxNode<Self::Language>) -> Option<Self>

Source§

fn syntax(&self) -> &SyntaxNode<Self::Language>

Source§

fn clone_for_update(&self) -> Self
where Self: Sized,

Source§

fn clone_subtree(&self) -> Self
where Self: Sized,

Source§

impl Default for Buildinfo

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<Paragraph> for Buildinfo

Source§

fn from(paragraph: Paragraph) -> Self

Converts to this type from the input type.
Source§

impl FromStr for Buildinfo

Source§

type Err = ParseError

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

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

Parses a string s to return a value of this type. Read more

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
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> 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.

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.