libappstream::prelude

Trait ReleaseExt

source
pub trait ReleaseExt:
    IsA<Release>
    + Sealed
    + 'static {
Show 29 methods // Provided methods fn add_artifact(&self, artifact: &impl IsA<Artifact>) { ... } fn add_issue(&self, issue: &impl IsA<Issue>) { ... } fn add_tag(&self, ns: &str, tag: &str) -> bool { ... } fn clear_tags(&self) { ... } fn artifacts(&self) -> Vec<Artifact> { ... } fn context(&self) -> Option<Context> { ... } fn date(&self) -> Option<GString> { ... } fn date_eol(&self) -> Option<GString> { ... } fn description(&self) -> Option<GString> { ... } fn issues(&self) -> Vec<Issue> { ... } fn kind(&self) -> ReleaseKind { ... } fn timestamp(&self) -> u64 { ... } fn timestamp_eol(&self) -> u64 { ... } fn urgency(&self) -> UrgencyKind { ... } fn url(&self, url_kind: ReleaseUrlKind) -> Option<GString> { ... } fn version(&self) -> Option<GString> { ... } fn has_tag(&self, ns: &str, tag: &str) -> bool { ... } fn remove_tag(&self, ns: &str, tag: &str) -> bool { ... } fn set_context(&self, context: &impl IsA<Context>) { ... } fn set_date(&self, date: &str) { ... } fn set_date_eol(&self, date: &str) { ... } fn set_description(&self, description: &str, locale: Option<&str>) { ... } fn set_kind(&self, kind: ReleaseKind) { ... } fn set_timestamp(&self, timestamp: u64) { ... } fn set_timestamp_eol(&self, timestamp: u64) { ... } fn set_urgency(&self, urgency: UrgencyKind) { ... } fn set_url(&self, url_kind: ReleaseUrlKind, url: &str) { ... } fn set_version(&self, version: &str) { ... } fn vercmp(&self, rel2: &impl IsA<Release>) -> i32 { ... }
}
Expand description

Trait containing all Release methods.

§Implementors

Release

Provided Methods§

source

fn add_artifact(&self, artifact: &impl IsA<Artifact>)

Add an artifact (binary / source download) for this release.

§artifact

The Artifact.

source

fn add_issue(&self, issue: &impl IsA<Issue>)

Add information about a (resolved) issue to this release.

§issue

The Issue.

source

fn add_tag(&self, ns: &str, tag: &str) -> bool

Add a tag to this release.

§ns

The namespace the tag belongs to

§tag

The tag name

§Returns

true if the tag was added.

source

fn clear_tags(&self)

Remove all tags associated with this release.

source

fn artifacts(&self) -> Vec<Artifact>

Get a list of all downloadable artifacts that are associated with this release.

§Returns

an array of Artifact objects.

source

fn context(&self) -> Option<Context>

§Returns

the Context associated with this release. This function may return None if no context is set.

source

fn date(&self) -> Option<GString>

Gets the release date.

§Returns

The date in ISO8601 format.

source

fn date_eol(&self) -> Option<GString>

Gets the end-of-life date for this release.

§Returns

The EOL date in ISO8601 format.

source

fn description(&self) -> Option<GString>

Gets the release description markup for a given locale.

§Returns

markup, or None for not set or invalid

source

fn issues(&self) -> Vec<Issue>

Get a list of all issues resolved by this release.

§Returns

an array of Issue objects.

source

fn kind(&self) -> ReleaseKind

Gets the type of the release. (development or stable release)

source

fn timestamp(&self) -> u64

Gets the release timestamp.

§Returns

timestamp, or 0 for unset

source

fn timestamp_eol(&self) -> u64

Gets the UNIX timestamp for the date when this release is out of support (end-of-life).

§Returns

UNIX timestamp, or 0 for unset or invalid.

source

fn urgency(&self) -> UrgencyKind

Gets the urgency of the release (showing how important it is to update to a more recent release)

§Returns

UrgencyKind, or UrgencyKind::Unknown for not set

source

fn url(&self, url_kind: ReleaseUrlKind) -> Option<GString>

Gets an URL.

§url_kind

the URL kind, e.g. ReleaseUrlKind::Details.

§Returns

string, or None if unset

source

fn version(&self) -> Option<GString>

Gets the release version.

§Returns

string, or None for not set or invalid

source

fn has_tag(&self, ns: &str, tag: &str) -> bool

Test if the release is tagged with the selected tag.

§ns

The namespace the tag belongs to

§tag

The tag name

§Returns

true if tag exists.

source

fn remove_tag(&self, ns: &str, tag: &str) -> bool

Remove a tag from this release

§ns

The namespace the tag belongs to

§tag

The tag name

§Returns

true if the tag was removed.

source

fn set_context(&self, context: &impl IsA<Context>)

Sets the document context this release is associated with.

§context

the Context.

source

fn set_date(&self, date: &str)

Sets the release date.

§date

the date in ISO8601 format.

source

fn set_date_eol(&self, date: &str)

Sets the end-of-life date for this release.

§date

the EOL date in ISO8601 format.

source

fn set_description(&self, description: &str, locale: Option<&str>)

Sets the description release markup.

§description

the description markup.

§locale

the BCP47 locale, or None. e.g. “en-GB”.

source

fn set_kind(&self, kind: ReleaseKind)

Sets the release kind to distinguish between end-user ready stable releases and development prereleases..

§kind

the ReleaseKind

source

fn set_timestamp(&self, timestamp: u64)

Sets the release timestamp.

§timestamp

the timestamp value.

source

fn set_timestamp_eol(&self, timestamp: u64)

Sets the UNIX timestamp for the date when this release is out of support (end-of-life).

§timestamp

the timestamp value.

source

fn set_urgency(&self, urgency: UrgencyKind)

Sets the release urgency.

§urgency

the urgency of this release/update (as UrgencyKind)

source

fn set_url(&self, url_kind: ReleaseUrlKind, url: &str)

Sets an URL for this release.

§url_kind

the URL kind, e.g. ReleaseUrlKind::Details

§url

the full URL.

source

fn set_version(&self, version: &str)

Sets the release version.

§version

the version string.

source

fn vercmp(&self, rel2: &impl IsA<Release>) -> i32

Compare the version numbers of two releases.

§rel2

an Release

§Returns

1 if self version is higher than rel2, 0 if versions are equal, -1 if rel2 version is higher than self.

Object Safety§

This trait is not object safe.

Implementors§