libappstream::prelude

Trait ContextExt

source
pub trait ContextExt:
    IsA<Context>
    + Sealed
    + 'static {
Show 18 methods // Provided methods fn filename(&self) -> Option<GString> { ... } fn format_version(&self) -> FormatVersion { ... } fn locale(&self) -> Option<GString> { ... } fn is_locale_use_all(&self) -> bool { ... } fn media_baseurl(&self) -> Option<GString> { ... } fn origin(&self) -> Option<GString> { ... } fn priority(&self) -> i32 { ... } fn style(&self) -> FormatStyle { ... } fn value_flags(&self) -> ValueFlags { ... } fn has_media_baseurl(&self) -> bool { ... } fn set_filename(&self, fname: &str) { ... } fn set_format_version(&self, ver: FormatVersion) { ... } fn set_locale(&self, locale: Option<&str>) { ... } fn set_media_baseurl(&self, value: &str) { ... } fn set_origin(&self, value: &str) { ... } fn set_priority(&self, priority: i32) { ... } fn set_style(&self, style: FormatStyle) { ... } fn set_value_flags(&self, flags: ValueFlags) { ... }
}
Expand description

Trait containing all Context methods.

§Implementors

Context

Provided Methods§

source

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

§Returns

The name of the file the data originates from.

source

fn format_version(&self) -> FormatVersion

§Returns

The AppStream format version.

source

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

§Returns

The active locale in BCP47 format.

source

fn is_locale_use_all(&self) -> bool

§Returns

true if all locale should be parsed.

source

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

§Returns

The media base URL.

source

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

§Returns

The data origin.

source

fn priority(&self) -> i32

§Returns

The data priority.

source

fn style(&self) -> FormatStyle

§Returns

The document style.

source

fn value_flags(&self) -> ValueFlags

§Returns

The ValueFlags that are set on cpt.

source

fn has_media_baseurl(&self) -> bool

§Returns

true if a media base URL is set.

source

fn set_filename(&self, fname: &str)

Sets the file name we are loading data from.

§fname

the new file name.

source

fn set_format_version(&self, ver: FormatVersion)

Sets the AppStream format version.

§ver

the new format version.

source

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

Sets the active locale. If the magic value “ALL” is used, the current system locale will be used for data reading, but when writing data all locale will be written.

§locale

a POSIX or BCP47 locale, or None. e.g. “en_GB”

source

fn set_media_baseurl(&self, value: &str)

Sets the media base URL.

§value

the new value.

source

fn set_origin(&self, value: &str)

Sets the data origin.

§value

the new value.

source

fn set_priority(&self, priority: i32)

Sets the data priority.

§priority

the new priority.

source

fn set_style(&self, style: FormatStyle)

Sets the AppStream document style.

§style

the new document style.

source

fn set_value_flags(&self, flags: ValueFlags)

§flags

ValueFlags to set on cpt.

Object Safety§

This trait is not object safe.

Implementors§