pub trait ComponentExt:
IsA<Component>
+ Sealed
+ 'static {
Show 134 methods
// Provided methods
fn add_addon(&self, addon: &impl IsA<Component>) { ... }
fn add_agreement(&self, agreement: &impl IsA<Agreement>) { ... }
fn add_bundle(&self, bundle: &impl IsA<Bundle>) { ... }
fn add_category(&self, category: &str) { ... }
fn add_content_rating(&self, content_rating: &impl IsA<ContentRating>) { ... }
fn add_extends(&self, cpt_id: &str) { ... }
fn add_icon(&self, icon: &impl IsA<Icon>) { ... }
fn add_keyword(&self, keyword: &str, locale: Option<&str>) { ... }
fn add_language(&self, locale: Option<&str>, percentage: i32) { ... }
fn add_launchable(&self, launchable: &impl IsA<Launchable>) { ... }
fn add_provided(&self, prov: &impl IsA<Provided>) { ... }
fn add_provided_item(&self, kind: ProvidedKind, item: &str) { ... }
fn add_relation(&self, relation: &impl IsA<Relation>) { ... }
fn add_release(&self, release: &impl IsA<Release>) { ... }
fn add_replaces(&self, cid: &str) { ... }
fn add_review(&self, review: &impl IsA<Review>) { ... }
fn add_screenshot(&self, sshot: &impl IsA<Screenshot>) { ... }
fn add_suggested(&self, suggested: &impl IsA<Suggested>) { ... }
fn add_tag(&self, ns: &str, tag: &str) -> bool { ... }
fn add_translation(&self, tr: &impl IsA<Translation>) { ... }
fn add_url(&self, url_kind: UrlKind, url: &str) { ... }
fn clear_keywords(&self, locale: Option<&str>) { ... }
fn clear_languages(&self) { ... }
fn clear_tags(&self) { ... }
fn addons(&self) -> Vec<Component> { ... }
fn agreement_by_kind(&self, kind: AgreementKind) -> Option<Agreement> { ... }
fn agreements(&self) -> Vec<Agreement> { ... }
fn branch(&self) -> Option<GString> { ... }
fn branding(&self) -> Option<Branding> { ... }
fn bundle(&self, bundle_kind: BundleKind) -> Option<Bundle> { ... }
fn bundles(&self) -> Vec<Bundle> { ... }
fn categories(&self) -> Vec<GString> { ... }
fn compulsory_for_desktops(&self) -> Vec<GString> { ... }
fn content_rating(&self, kind: &str) -> Option<ContentRating> { ... }
fn content_ratings(&self) -> Vec<ContentRating> { ... }
fn context(&self) -> Option<Context> { ... }
fn custom_value(&self, key: &str) -> Option<GString> { ... }
fn data_id(&self) -> Option<GString> { ... }
fn date_eol(&self) -> Option<GString> { ... }
fn description(&self) -> Option<GString> { ... }
fn extends(&self) -> Vec<GString> { ... }
fn icon_by_size(&self, width: u32, height: u32) -> Option<Icon> { ... }
fn icon_stock(&self) -> Option<Icon> { ... }
fn icons(&self) -> Vec<Icon> { ... }
fn id(&self) -> Option<GString> { ... }
fn keywords(&self) -> Vec<GString> { ... }
fn kind(&self) -> ComponentKind { ... }
fn language(&self, locale: Option<&str>) -> i32 { ... }
fn languages(&self) -> Vec<GString> { ... }
fn launchable(&self, kind: LaunchableKind) -> Option<Launchable> { ... }
fn launchables(&self) -> Vec<Launchable> { ... }
fn merge_kind(&self) -> MergeKind { ... }
fn metadata_license(&self) -> Option<GString> { ... }
fn name(&self) -> Option<GString> { ... }
fn name_variant_suffix(&self) -> Option<GString> { ... }
fn origin(&self) -> Option<GString> { ... }
fn pkgname(&self) -> Option<GString> { ... }
fn pkgnames(&self) -> Vec<GString> { ... }
fn priority(&self) -> i32 { ... }
fn project_group(&self) -> Option<GString> { ... }
fn project_license(&self) -> Option<GString> { ... }
fn provided(&self) -> Vec<Provided> { ... }
fn provided_for_kind(&self, kind: ProvidedKind) -> Option<Provided> { ... }
fn recommends(&self) -> Vec<Relation> { ... }
fn releases_plain(&self) -> Option<ReleaseList> { ... }
fn replaces(&self) -> Vec<GString> { ... }
fn requires(&self) -> Vec<Relation> { ... }
fn reviews(&self) -> Vec<Review> { ... }
fn scope(&self) -> ComponentScope { ... }
fn screenshots_all(&self) -> Vec<Screenshot> { ... }
fn search_tokens(&self) -> Vec<GString> { ... }
fn sort_score(&self) -> u32 { ... }
fn source_pkgname(&self) -> Option<GString> { ... }
fn suggested(&self) -> Vec<Suggested> { ... }
fn summary(&self) -> Option<GString> { ... }
fn supports(&self) -> Vec<Relation> { ... }
fn timestamp_eol(&self) -> u64 { ... }
fn translations(&self) -> Vec<Translation> { ... }
fn url(&self, url_kind: UrlKind) -> Option<GString> { ... }
fn has_bundle(&self) -> bool { ... }
fn has_category(&self, category: &str) -> bool { ... }
fn has_tag(&self, ns: &str, tag: &str) -> bool { ... }
fn insert_custom_value(&self, key: &str, value: &str) -> bool { ... }
fn is_compulsory_for_desktop(&self, desktop: &str) -> bool { ... }
fn is_floss(&self) -> bool { ... }
fn is_ignored(&self) -> bool { ... }
fn is_member_of_category(&self, category: &impl IsA<Category>) -> bool { ... }
fn is_valid(&self) -> bool { ... }
fn load_from_bytes(
&self,
context: &impl IsA<Context>,
format: FormatKind,
bytes: &Bytes,
) -> Result<(), Error> { ... }
fn load_releases(
&self,
allow_net: bool,
) -> Result<Option<ReleaseList>, Error> { ... }
fn remove_tag(&self, ns: &str, tag: &str) -> bool { ... }
fn search_matches(&self, term: &str) -> u32 { ... }
fn set_branch(&self, branch: &str) { ... }
fn set_branding(&self, branding: &impl IsA<Branding>) { ... }
fn set_compulsory_for_desktop(&self, desktop: &str) { ... }
fn set_context(&self, context: &impl IsA<Context>) { ... }
fn set_context_locale(&self, locale: &str) { ... }
fn set_data_id(&self, value: &str) { ... }
fn set_date_eol(&self, date: &str) { ... }
fn set_description(&self, value: &str, locale: Option<&str>) { ... }
fn set_id(&self, value: &str) { ... }
fn set_keywords(
&self,
new_keywords: &[&str],
locale: Option<&str>,
deep_copy: bool,
) { ... }
fn set_kind(&self, value: ComponentKind) { ... }
fn set_merge_kind(&self, kind: MergeKind) { ... }
fn set_metadata_license(&self, value: &str) { ... }
fn set_name(&self, value: &str, locale: Option<&str>) { ... }
fn set_name_variant_suffix(&self, value: &str, locale: Option<&str>) { ... }
fn set_origin(&self, origin: &str) { ... }
fn set_pkgname(&self, pkgname: &str) { ... }
fn set_pkgnames(&self, packages: &[&str]) { ... }
fn set_priority(&self, priority: i32) { ... }
fn set_project_group(&self, value: &str) { ... }
fn set_project_license(&self, value: &str) { ... }
fn set_releases(&self, releases: &impl IsA<ReleaseList>) { ... }
fn set_scope(&self, scope: ComponentScope) { ... }
fn set_sort_score(&self, score: u32) { ... }
fn set_source_pkgname(&self, spkgname: &str) { ... }
fn set_summary(&self, value: &str, locale: Option<&str>) { ... }
fn sort_screenshots(
&self,
environment: Option<&str>,
style: Option<&str>,
prioritize_style: bool,
) { ... }
fn to_str(&self) -> GString { ... }
fn to_xml_data(&self, context: &impl IsA<Context>) -> Result<GString, Error> { ... }
fn connect_categories_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_description_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_icons_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn connect_keywords_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_kind_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_pkgnames_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_project_group_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_project_license_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_screenshots_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_summary_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_urls_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Provided Methods§
sourcefn add_agreement(&self, agreement: &impl IsA<Agreement>)
fn add_agreement(&self, agreement: &impl IsA<Agreement>)
sourcefn add_bundle(&self, bundle: &impl IsA<Bundle>)
fn add_bundle(&self, bundle: &impl IsA<Bundle>)
sourcefn add_category(&self, category: &str)
fn add_category(&self, category: &str)
sourcefn add_content_rating(&self, content_rating: &impl IsA<ContentRating>)
fn add_content_rating(&self, content_rating: &impl IsA<ContentRating>)
sourcefn add_extends(&self, cpt_id: &str)
fn add_extends(&self, cpt_id: &str)
Add a reference to the extended component
§cpt_id
The id of a component which is extended by this component
sourcefn add_keyword(&self, keyword: &str, locale: Option<&str>)
fn add_keyword(&self, keyword: &str, locale: Option<&str>)
sourcefn add_language(&self, locale: Option<&str>, percentage: i32)
fn add_language(&self, locale: Option<&str>, percentage: i32)
sourcefn add_launchable(&self, launchable: &impl IsA<Launchable>)
fn add_launchable(&self, launchable: &impl IsA<Launchable>)
Adds a Launchable
containing launchables entries for this component.
§launchable
a Launchable
instance.
sourcefn add_provided(&self, prov: &impl IsA<Provided>)
fn add_provided(&self, prov: &impl IsA<Provided>)
sourcefn add_provided_item(&self, kind: ProvidedKind, item: &str)
fn add_provided_item(&self, kind: ProvidedKind, item: &str)
Adds a provided item to the component with the given kind
, creating a new
Provided
for this kind internally if necessary.
§kind
the kind of the provided item (e.g. ProvidedKind::Mediatype
)
§item
the item to add.
sourcefn add_relation(&self, relation: &impl IsA<Relation>)
fn add_relation(&self, relation: &impl IsA<Relation>)
sourcefn add_release(&self, release: &impl IsA<Release>)
fn add_release(&self, release: &impl IsA<Release>)
sourcefn add_replaces(&self, cid: &str)
fn add_replaces(&self, cid: &str)
Add the component ID of a component that gets replaced by the current component.
§cid
an AppStream component ID
sourcefn add_review(&self, review: &impl IsA<Review>)
fn add_review(&self, review: &impl IsA<Review>)
sourcefn add_screenshot(&self, sshot: &impl IsA<Screenshot>)
fn add_screenshot(&self, sshot: &impl IsA<Screenshot>)
sourcefn add_suggested(&self, suggested: &impl IsA<Suggested>)
fn add_suggested(&self, suggested: &impl IsA<Suggested>)
sourcefn add_translation(&self, tr: &impl IsA<Translation>)
fn add_translation(&self, tr: &impl IsA<Translation>)
Assign an Translation
object describing the translation system used
by this component.
§tr
an Translation
instance.
sourcefn add_url(&self, url_kind: UrlKind, url: &str)
fn add_url(&self, url_kind: UrlKind, url: &str)
Adds some URL data to the component.
§url_kind
the URL kind, e.g. UrlKind::Homepage
§url
the full URL.
sourcefn clear_keywords(&self, locale: Option<&str>)
fn clear_keywords(&self, locale: Option<&str>)
sourcefn clear_languages(&self)
fn clear_languages(&self)
Remove all registered language translation information.
Remove all tags associated with this component.
sourcefn agreement_by_kind(&self, kind: AgreementKind) -> Option<Agreement>
fn agreement_by_kind(&self, kind: AgreementKind) -> Option<Agreement>
Gets an agreement the component has specified for the particular kind.
§kind
an agreement kind, e.g. AgreementKind::Eula
§Returns
sourcefn agreements(&self) -> Vec<Agreement>
fn agreements(&self) -> Vec<Agreement>
sourcefn bundle(&self, bundle_kind: BundleKind) -> Option<Bundle>
fn bundle(&self, bundle_kind: BundleKind) -> Option<Bundle>
sourcefn categories(&self) -> Vec<GString>
fn categories(&self) -> Vec<GString>
§Returns
String array of categories
sourcefn compulsory_for_desktops(&self) -> Vec<GString>
fn compulsory_for_desktops(&self) -> Vec<GString>
§Returns
A list of desktops where this component is compulsory
sourcefn content_rating(&self, kind: &str) -> Option<ContentRating>
fn content_rating(&self, kind: &str) -> Option<ContentRating>
Gets a content ratings of a specific type that are defined for this component.
§kind
a ratings kind, e.g. “oars-1.0”
§Returns
a ContentRating
or None
if not found
sourcefn content_ratings(&self) -> Vec<ContentRating>
fn content_ratings(&self) -> Vec<ContentRating>
sourcefn custom_value(&self, key: &str) -> Option<GString>
fn custom_value(&self, key: &str) -> Option<GString>
sourcefn data_id(&self) -> Option<GString>
fn data_id(&self) -> Option<GString>
Get a unique identifier for this metadata set. This unique ID is only valid for the current session, as opposed to the AppStream ID which uniquely identifies a software component.
The format of the unique id usually is: %{scope}/%{origin}/%{distribution_system}/%{appstream_id}
For example: system/os/package/org.example.FooBar
§Returns
the unique session-specific identifier.
sourcefn date_eol(&self) -> Option<GString>
fn date_eol(&self) -> Option<GString>
Gets the end-of-life date for the entire component.
§Returns
The EOL date as string in ISO8601 format.
sourcefn description(&self) -> Option<GString>
fn description(&self) -> Option<GString>
sourcefn icon_by_size(&self, width: u32, height: u32) -> Option<Icon>
fn icon_by_size(&self, width: u32, height: u32) -> Option<Icon>
Gets an icon matching the size constraints.
The icons are not filtered by type, and the first icon
which matches the size is returned.
If you want more control over which icons you use for displaying,
use the icons()
function to get a list of all icons.
Note that this function is not HiDPI aware! It will never return an icon with a scaling factor > 1.
§width
The icon width in pixels.
§height
the icon height in pixels.
§Returns
An icon matching the given width/height, or None
if not found.
sourcefn icon_stock(&self) -> Option<Icon>
fn icon_stock(&self) -> Option<Icon>
sourcefn kind(&self) -> ComponentKind
fn kind(&self) -> ComponentKind
sourcefn launchable(&self, kind: LaunchableKind) -> Option<Launchable>
fn launchable(&self, kind: LaunchableKind) -> Option<Launchable>
Gets a Launchable
of a specific type that contains launchable entries for
this component.
§kind
a launch kind, e.g. LaunchableKind::DesktopId
§Returns
a Launchable
or None
if not found
sourcefn launchables(&self) -> Vec<Launchable>
fn launchables(&self) -> Vec<Launchable>
§Returns
an array
sourcefn merge_kind(&self) -> MergeKind
fn merge_kind(&self) -> MergeKind
sourcefn metadata_license(&self) -> Option<GString>
fn metadata_license(&self) -> Option<GString>
sourcefn name_variant_suffix(&self) -> Option<GString>
fn name_variant_suffix(&self) -> Option<GString>
Get variant suffix for the component name (only to be displayed if two components have the same name).
§Returns
the variant suffix
fn origin(&self) -> Option<GString>
sourcefn pkgname(&self) -> Option<GString>
fn pkgname(&self) -> Option<GString>
Get the first package name of the list of packages that need to be installed for this component to be present on the system. Since most components consist of only one package, this is safe to use for about 90% of all cases.
However, to support a component fully, please use pkgnames()
for
getting all packages that need to be installed, and use this method only to
e.g. get the main package to perform a quick “is it installed?” check.
§Returns
String array of package names
sourcefn pkgnames(&self) -> Vec<GString>
fn pkgnames(&self) -> Vec<GString>
Get a list of package names which this component consists of. This usually is just one package name.
§Returns
String array of package names
sourcefn priority(&self) -> i32
fn priority(&self) -> i32
Returns the priority of this component. This method is used internally.
sourcefn project_group(&self) -> Option<GString>
fn project_group(&self) -> Option<GString>
sourcefn project_license(&self) -> Option<GString>
fn project_license(&self) -> Option<GString>
sourcefn provided_for_kind(&self, kind: ProvidedKind) -> Option<Provided>
fn provided_for_kind(&self, kind: ProvidedKind) -> Option<Provided>
Get an Provided
object for the given interface type,
containing information about the public interfaces (mimetypes, firmware, DBus services, …)
this component provides.
§kind
kind of the provided item, e.g. ProvidedKind::Mediatype
§Returns
Provided
containing the items this component provides, or None
.
sourcefn recommends(&self) -> Vec<Relation>
fn recommends(&self) -> Vec<Relation>
sourcefn releases_plain(&self) -> Option<ReleaseList>
fn releases_plain(&self) -> Option<ReleaseList>
Get release information for this component, without downloading or loading any data from external sources.
§Returns
Release information as ReleaseList
sourcefn replaces(&self) -> Vec<GString>
fn replaces(&self) -> Vec<GString>
Get a list of component IDs of components that this software replaces entirely.
§Returns
an array of component-IDs
sourcefn scope(&self) -> ComponentScope
fn scope(&self) -> ComponentScope
§Returns
the ComponentScope
of this component.
sourcefn screenshots_all(&self) -> Vec<Screenshot>
fn screenshots_all(&self) -> Vec<Screenshot>
Get a list of all associated screenshots, for all environments.
§Returns
an array of Screenshot
instances
sourcefn search_tokens(&self) -> Vec<GString>
fn search_tokens(&self) -> Vec<GString>
sourcefn sort_score(&self) -> u32
fn sort_score(&self) -> u32
Returns the sorting priority of this component.
This will only return a valid value if this component was the result of or involved in a search operation which returned sorted results. In most cases you will not need to access this value explicitly, as all results of search operations in AppStream are already sorted from best match to worst.
The returned value is an arbitrary integer value, valid only for the search terms involved in the search operation that yielded this component as a result.
sourcefn source_pkgname(&self) -> Option<GString>
fn source_pkgname(&self) -> Option<GString>
§Returns
the source package name.
sourcefn supports(&self) -> Vec<Relation>
fn supports(&self) -> Vec<Relation>
Get an array of items that are supported by this component, e.g. to indicate support for a specific piece of hardware.
§Returns
an array
sourcefn timestamp_eol(&self) -> u64
fn timestamp_eol(&self) -> u64
Gets the UNIX timestamp for the date when this component is out of support (end-of-life) and will receive no more updates, not even security fixes.
§Returns
UNIX timestamp, or 0 for unset or invalid.
sourcefn translations(&self) -> Vec<Translation>
fn translations(&self) -> Vec<Translation>
Get a GPtrArray
of Translation
objects describing the
translation systems and translation-ids (e.g. Gettext domains) used
by this software component.
Only set for metainfo files.
§Returns
An array of Translation
objects.
sourcefn has_bundle(&self) -> bool
fn has_bundle(&self) -> bool
sourcefn has_category(&self, category: &str) -> bool
fn has_category(&self, category: &str) -> bool
sourcefn insert_custom_value(&self, key: &str, value: &str) -> bool
fn insert_custom_value(&self, key: &str, value: &str) -> bool
sourcefn is_compulsory_for_desktop(&self, desktop: &str) -> bool
fn is_compulsory_for_desktop(&self, desktop: &str) -> bool
sourcefn is_ignored(&self) -> bool
fn is_ignored(&self) -> bool
§Returns
Whether this component’s metadata should be ignored.
sourcefn is_member_of_category(&self, category: &impl IsA<Category>) -> bool
fn is_member_of_category(&self, category: &impl IsA<Category>) -> bool
sourcefn is_valid(&self) -> bool
fn is_valid(&self) -> bool
Check if the essential properties of this Component are populated with useful data.
§Returns
TRUE if the component data was validated successfully.
sourcefn load_from_bytes(
&self,
context: &impl IsA<Context>,
format: FormatKind,
bytes: &Bytes,
) -> Result<(), Error>
fn load_from_bytes( &self, context: &impl IsA<Context>, format: FormatKind, bytes: &Bytes, ) -> Result<(), Error>
Load metadata for this component from an XML string.
You normally do not want to use this method directly and instead use the more
convenient API of Metadata
to create and update components.
If this function returns true
, a valid component is returned unless the selected
format was FormatKind::DesktopEntry
, in which case a component ID will have to
be set explicitly by the caller in order to make the component valid.
§context
an Context
instance.
§format
the format of the data to load, e.g. FormatKind::Xml
§bytes
the data to load.
§Returns
true
on success.
sourcefn load_releases(&self, allow_net: bool) -> Result<Option<ReleaseList>, Error>
fn load_releases(&self, allow_net: bool) -> Result<Option<ReleaseList>, Error>
Get release information for this component, download it if necessary.
§Returns
Release information as ReleaseList
, or None
if loading failed.
sourcefn remove_tag(&self, ns: &str, tag: &str) -> bool
fn remove_tag(&self, ns: &str, tag: &str) -> bool
sourcefn search_matches(&self, term: &str) -> u32
fn search_matches(&self, term: &str) -> u32
sourcefn set_branch(&self, branch: &str)
fn set_branch(&self, branch: &str)
Set the branch that the component instance was sourced from.
§branch
the branch, e.g. “master” or “3-16”.
sourcefn set_branding(&self, branding: &impl IsA<Branding>)
fn set_branding(&self, branding: &impl IsA<Branding>)
sourcefn set_compulsory_for_desktop(&self, desktop: &str)
fn set_compulsory_for_desktop(&self, desktop: &str)
Mark this component to be compulsory for the specified desktop environment.
§desktop
The name of the desktop.
sourcefn set_context(&self, context: &impl IsA<Context>)
fn set_context(&self, context: &impl IsA<Context>)
sourcefn set_context_locale(&self, locale: &str)
fn set_context_locale(&self, locale: &str)
Set the active locale on the context assoaiacted with this component, creating a new context for the component if none exists yet.
Please not that this will flip the locale of all other components and
entities that use the same context as well!
This function is just a convenience method, and does not replace
proper Context
management.
§locale
the new locale.
sourcefn set_data_id(&self, value: &str)
fn set_data_id(&self, value: &str)
Set the session-specific unique metadata identifier for this component. If two components have a different data_id but the same ID, they will be treated as independent sets of metadata describing the same component type.
§value
the unique session-specific identifier.
sourcefn set_date_eol(&self, date: &str)
fn set_date_eol(&self, date: &str)
sourcefn set_description(&self, value: &str, locale: Option<&str>)
fn set_description(&self, value: &str, locale: Option<&str>)
sourcefn set_kind(&self, value: ComponentKind)
fn set_kind(&self, value: ComponentKind)
sourcefn set_merge_kind(&self, kind: MergeKind)
fn set_merge_kind(&self, kind: MergeKind)
sourcefn set_metadata_license(&self, value: &str)
fn set_metadata_license(&self, value: &str)
sourcefn set_name_variant_suffix(&self, value: &str, locale: Option<&str>)
fn set_name_variant_suffix(&self, value: &str, locale: Option<&str>)
sourcefn set_origin(&self, origin: &str)
fn set_origin(&self, origin: &str)
§origin
the origin.
sourcefn set_pkgname(&self, pkgname: &str)
fn set_pkgname(&self, pkgname: &str)
sourcefn set_pkgnames(&self, packages: &[&str])
fn set_pkgnames(&self, packages: &[&str])
Set a list of package names this component consists of. (This should usually be just one package name)
sourcefn set_priority(&self, priority: i32)
fn set_priority(&self, priority: i32)
sourcefn set_project_group(&self, value: &str)
fn set_project_group(&self, value: &str)
sourcefn set_project_license(&self, value: &str)
fn set_project_license(&self, value: &str)
sourcefn set_releases(&self, releases: &impl IsA<ReleaseList>)
fn set_releases(&self, releases: &impl IsA<ReleaseList>)
sourcefn set_scope(&self, scope: ComponentScope)
fn set_scope(&self, scope: ComponentScope)
sourcefn set_sort_score(&self, score: u32)
fn set_sort_score(&self, score: u32)
sourcefn set_source_pkgname(&self, spkgname: &str)
fn set_source_pkgname(&self, spkgname: &str)
§spkgname
the source package name.
sourcefn set_summary(&self, value: &str, locale: Option<&str>)
fn set_summary(&self, value: &str, locale: Option<&str>)
sourcefn sort_screenshots(
&self,
environment: Option<&str>,
style: Option<&str>,
prioritize_style: bool,
)
fn sort_screenshots( &self, environment: Option<&str>, style: Option<&str>, prioritize_style: bool, )
Reorder the screenshots to prioritize a certain environment or style, instead of using the default screenshot order.
If both “environment” and “style” are None
, the previous default order is restored.
§environment
a GUI environment string, e.g. “plasma” or “gnome”
§style
and environment style string, e.g. “light” or “dark”
§prioritize_style
if true
, order screenshots of the given style earlier than ones of the given environment.