pub struct SrcInfo { /* private fields */ }

Implementations

Parse the .SRCINFO file, returning a ParserError if there was an issue parsing the file.

content should be a string representing the content of the .SRCINFO file.

Get a value for anything that’s a string variable in a PKGBUILD.

Note that you’ll need to use SrcInfo::get_array if you want to get the pkgname variable, since that has the ability to be more than one item.

This function also accepts extended variables (i.e. focal_postrm), though only variables that can be extended by makedeb are supported.

Returns the Some variant if the variable can be found, otherwise the None variant is returned.

Get a value for anything that’s an array variable in a PKGBUILD.

This function also accepts extended variables (i.e. focal_depends), though only variables that can be extended by makedeb are supported.

Returns the Some variant if the variable can be found, otherwise the None variant is returned.

Get the extended names (as well as the key itself) for a variable. Use this if you need a variable as well as any same variable that contains distribution and architecture extensions.

If key isn’t a key makedeb supports for variable name extensions, this will return the None variant, regardless of if the base key is in the .SRCINFO file or not.

This returns a vector of strings that can be then passed into [SrcInfo.get_string] and [SrcInfo.get_array].

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.