pub enum PackageProperty {
EmptyLine,
Comment(String),
MetaProperty(SharedMetaProperty),
RelationProperty(RelationProperty),
Clear(ClearableProperty),
}Expand description
All possible properties of a pkgname section in SRCINFO data.
It’s very similar to RawPackageBase, but with less fields and the possibility to explicitly
set some fields to “empty”.
Variants§
EmptyLine
An empty line.
Comment(String)
A commented line.
MetaProperty(SharedMetaProperty)
RelationProperty(RelationProperty)
Clear(ClearableProperty)
Implementations§
Source§impl PackageProperty
impl PackageProperty
Sourcefn parser(input: &mut &str) -> ModalResult<PackageProperty>
fn parser(input: &mut &str) -> ModalResult<PackageProperty>
Handles any line in a pkgname package section.
This is a wrapper to separate the logic between comments/empty lines and actual package properties.
Sourcefn property_parser(input: &mut &str) -> ModalResult<PackageProperty>
fn property_parser(input: &mut &str) -> ModalResult<PackageProperty>
Recognizes keyword assignments in a pkgname 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 in that enum.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PackageProperty
impl RefUnwindSafe for PackageProperty
impl Send for PackageProperty
impl Sync for PackageProperty
impl Unpin for PackageProperty
impl UnwindSafe for PackageProperty
Blanket Implementations§
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