Enum RelationProperty

Source
pub enum RelationProperty {
    Dependency(ArchProperty<RelationOrSoname>),
    OptionalDependency(ArchProperty<OptionalDependency>),
    Provides(ArchProperty<RelationOrSoname>),
    Conflicts(ArchProperty<PackageRelation>),
    Replaces(ArchProperty<PackageRelation>),
}
Expand description

Properties related to package relations.

This only handles the shared package relations that can be used in both pkgbase and pkgname sections. pkgbase specific relations are explicitly handled in the RawPackageBase enum. See [alpm-package-relation] for further details on package relations and [alpm-sonamev1] for information on soname handling. [alpm-package-relation]: https://alpm.archlinux.page/specifications/alpm-package-relation.7.html [alpm-sonamev1]: https://alpm.archlinux.page/specifications/alpm-sonamev1.7.html

Variants§

§

Dependency(ArchProperty<RelationOrSoname>)

An ArchProperty<RelationOrSoname> for a run-time dependency.

§

OptionalDependency(ArchProperty<OptionalDependency>)

An ArchProperty<OptionalDependency> for an optional dependency.

§

Provides(ArchProperty<RelationOrSoname>)

An ArchProperty<RelationOrSoname> for a provision.

§

Conflicts(ArchProperty<PackageRelation>)

An ArchProperty<PackageRelation> for a conflict.

§

Replaces(ArchProperty<PackageRelation>)

An ArchProperty<PackageRelation> for a replacement.

Implementations§

Source§

impl RelationProperty

Source

fn parser(input: &mut &str) -> ModalResult<RelationProperty>

Recognizes package relation keyword assignments that may be present in both pkgbase and pkgname sections in SRCINFO data.

This function relies on RelationKeyword::parser to recognize the relevant keywords. This function backtracks in case no keyword in this group matches.

Source

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

Returns the Architecture of the current variant.

Can be used to extract the architecture without knowing which variant this is.

Trait Implementations§

Source§

impl Debug for RelationProperty

Source§

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

Formats the value using the given formatter. 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.

§

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

impl<T> ErasedDestructor for T
where T: 'static,