pub enum PackageBaseProperty {
EmptyLine,
Comment(String),
MetaProperty(SharedMetaProperty),
PackageVersion(PackageVersion),
PackageRelease(PackageRelease),
PackageEpoch(Epoch),
ValidPgpKeys(OpenPGPIdentifier),
RelationProperty(RelationProperty),
CheckDependency(ArchProperty<PackageRelation>),
MakeDependency(ArchProperty<PackageRelation>),
SourceProperty(SourceProperty),
}Expand description
All possible properties of a pkgbase section in SRCINFO data.
The ordering of the variants represents the order in which keywords would appear in a SRCINFO file. This is important as the file format represents stateful data which needs normalization.
The SRCINFO format allows comments and empty lines anywhere in the file. To produce meaningful error messages for the consumer during data normalization, the line number on which an error occurred is encoded in the parsed data.
Variants§
EmptyLine
An empty line.
Comment(String)
A commented line.
MetaProperty(SharedMetaProperty)
PackageVersion(PackageVersion)
PackageRelease(PackageRelease)
PackageEpoch(Epoch)
An Epoch.
ValidPgpKeys(OpenPGPIdentifier)
RelationProperty(RelationProperty)
CheckDependency(ArchProperty<PackageRelation>)
Build-time specific check dependencies.
MakeDependency(ArchProperty<PackageRelation>)
Build-time specific make dependencies.
SourceProperty(SourceProperty)
Source file properties
Implementations§
Source§impl PackageBaseProperty
impl PackageBaseProperty
Sourcefn parser(input: &mut &str) -> ModalResult<PackageBaseProperty>
fn parser(input: &mut &str) -> ModalResult<PackageBaseProperty>
Recognizes any line in the pkgbase section of SRCINFO data.
This is a wrapper to separate the logic between comments/empty lines and actual pkgbase
properties.
Sourcefn property_parser(input: &mut &str) -> ModalResult<PackageBaseProperty>
fn property_parser(input: &mut &str) -> ModalResult<PackageBaseProperty>
Recognizes keyword assignments in the pkgbase section in SRCINFO data.
Since there’re a lot of keywords and many of them are shared between the pkgbase and
pkgname section, the keywords are bundled into somewhat logical groups.
SourcePropertyare keywords that are related to thesourcekeyword, such as checksums.SharedMetaPropertyare keywords that are related to general meta properties of the package.RelationPropertyare keywords that describe the relation of the package to other packages.RawPackageBasehas two special relations that are explicitly handled inSelf::exclusive_property_parser.- Other fields that’re unique to the
RawPackageBaseare handled inSelf::exclusive_property_parser.
Sourcefn exclusive_property_parser(
input: &mut &str,
) -> ModalResult<PackageBaseProperty>
fn exclusive_property_parser( input: &mut &str, ) -> ModalResult<PackageBaseProperty>
Recognizes keyword assignments exclusive to the pkgbase section in SRCINFO data.
This function backtracks in case no keyword in this group matches.