[][src]Struct appstream::Collection

pub struct Collection {
    pub version: String,
    pub origin: Option<String>,
    pub components: Vec<Component>,
    pub architecture: Option<String>,
}

A collection is a wrapper around multiple components at once. Provided by the source of the components (a repository). See Collection Metadata.

Fields

version: String

The specification version used on the components.

origin: Option<String>

The origin of the collection, could be something like flathub.

components: Vec<Component>

The components that are part of this collection.

architecture: Option<String>

The targeted CPU architecture of the collection.

Implementations

impl Collection[src]

pub fn from_path(path: PathBuf) -> Result<Self, ParseError>[src]

Create a new Collection from an XML file.

Arguments

  • path - The path to the collection.

pub fn find_by_id(&self, id: AppId) -> Vec<&Component>[src]

Find the components that corresponds to a specific AppId

Trait Implementations

impl Clone for Collection[src]

impl Debug for Collection[src]

impl<'de> Deserialize<'de> for Collection[src]

impl PartialEq<Collection> for Collection[src]

impl Serialize for Collection[src]

impl StructuralPartialEq for Collection[src]

impl<'_> TryFrom<&'_ Element> for Collection[src]

type Error = ParseError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.