libappstream

Struct Component

source
pub struct Component { /* private fields */ }
Expand description

§Properties

§categories

string array of categories

Readable

§description

the description

Readable | Writeable

§icons

hash map of icon urls and sizes

Readable

§id

the unique identifier

Readable | Writeable

§keywords

string array of keywords

Readable | Writeable

§kind

the ComponentKind of this component

Readable | Writeable

§name

the name

Readable | Writeable

§pkgnames

string array of packages name

Readable | Writeable

§project-group

the project group

Readable | Writeable

§project-license

the project license

Readable | Writeable

§screenshots

An array of Screenshot instances

Readable

§summary

the summary

Readable | Writeable

§urls

the urls associated with this component

Readable

§Implements

ComponentExt

GLib type: GObject with reference counted clone semantics.

Implementations§

source§

impl Component

source

pub const NONE: Option<&'static Component> = None

source

pub fn new() -> Component

Creates a new Component.

§Returns

a new Component

Trait Implementations§

source§

impl Clone for Component

source§

fn clone(&self) -> Self

Makes a clone of this shared reference.

This increments the strong reference count of the object. Dropping the object will decrement it again.

1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Component

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for Component

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Display for Component

source§

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

Formats the value using the given formatter. Read more
source§

impl HasParamSpec for Component

source§

type ParamSpec = ParamSpecObject

source§

type SetValue = Component

Preferred value to be used as setter for the associated ParamSpec.
source§

type BuilderFn = fn(_: &str) -> ParamSpecObjectBuilder<'_, Component>

source§

fn param_spec_builder() -> Self::BuilderFn

source§

impl Hash for Component

source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Hashes the memory address of this object.

1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Component

source§

fn cmp(&self, other: &Self) -> Ordering

Comparison for two GObjects.

Compares the memory addresses of the provided objects.

1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
source§

impl ParentClassIs for Component

source§

impl<OT: ObjectType> PartialEq<OT> for Component

source§

fn eq(&self, other: &OT) -> bool

Equality for two GObjects.

Two GObjects are equal if their memory addresses are equal.

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<OT: ObjectType> PartialOrd<OT> for Component

source§

fn partial_cmp(&self, other: &OT) -> Option<Ordering>

Partial comparison for two GObjects.

Compares the memory addresses of the provided objects.

1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl StaticType for Component

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl Eq for Component

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> Cast for T
where T: ObjectType,

source§

fn upcast<T>(self) -> T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a superclass or interface T. Read more
source§

fn upcast_ref<T>(&self) -> &T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a reference of its superclass or interface T. Read more
source§

fn downcast<T>(self) -> Result<T, Self>
where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a subclass or interface implementor T. Read more
source§

fn downcast_ref<T>(&self) -> Option<&T>
where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a reference of its subclass or interface implementor T. Read more
source§

fn dynamic_cast<T>(self) -> Result<T, Self>
where T: ObjectType,

Tries to cast to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while upcast will do many checks at compile-time already. downcast will perform the same checks at runtime as dynamic_cast, but will also ensure some amount of compile-time safety. Read more
source§

fn dynamic_cast_ref<T>(&self) -> Option<&T>
where T: ObjectType,

Tries to cast to reference to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more
source§

unsafe fn unsafe_cast<T>(self) -> T
where T: ObjectType,

Casts to T unconditionally. Read more
source§

unsafe fn unsafe_cast_ref<T>(&self) -> &T
where T: ObjectType,

Casts to &T unconditionally. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<O> ComponentExt for O
where O: IsA<Component>,

source§

fn add_addon(&self, addon: &impl IsA<Component>)

Add a reference to the addon that is enhancing this component. Read more
source§

fn add_agreement(&self, agreement: &impl IsA<Agreement>)

Adds an agreement to the software component. Read more
source§

fn add_bundle(&self, bundle: &impl IsA<Bundle>)

Adds a bundle to the component. Read more
source§

fn add_category(&self, category: &str)

Add a category. Read more
source§

fn add_content_rating(&self, content_rating: &impl IsA<ContentRating>)

Adds a content rating to this component. Read more
source§

fn add_extends(&self, cpt_id: &str)

Add a reference to the extended component Read more
source§

fn add_icon(&self, icon: &impl IsA<Icon>)

Add an icon to this component. Read more
source§

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

Add a new keyword to the keywords list for the given locale. This function does not check for duplicate keywords. Read more
source§

fn add_language(&self, locale: Option<&str>, percentage: i32)

Adds a language to the component. Read more
source§

fn add_launchable(&self, launchable: &impl IsA<Launchable>)

Adds a Launchable containing launchables entries for this component. Read more
source§

fn add_provided(&self, prov: &impl IsA<Provided>)

Add a set of provided items to this component. Read more
source§

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. Read more
source§

fn add_relation(&self, relation: &impl IsA<Relation>)

Adds a Relation to set a recommends or requires relation of component self on the item mentioned in the Relation. Read more
source§

fn add_release(&self, release: &impl IsA<Release>)

Add an Release to this component. Read more
source§

fn add_replaces(&self, cid: &str)

Add the component ID of a component that gets replaced by the current component. Read more
source§

fn add_review(&self, review: &impl IsA<Review>)

Adds a user review to a software component. Read more
source§

fn add_screenshot(&self, sshot: &impl IsA<Screenshot>)

Add an Screenshot to this component. Read more
source§

fn add_suggested(&self, suggested: &impl IsA<Suggested>)

Add an Suggested to this component. Read more
source§

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

Add a tag to this component. Read more
source§

fn add_translation(&self, tr: &impl IsA<Translation>)

Assign an Translation object describing the translation system used by this component. Read more
source§

fn add_url(&self, url_kind: UrlKind, url: &str)

Adds some URL data to the component. Read more
source§

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

Remove all keywords for the given locale. Read more
source§

fn clear_languages(&self)

Remove all registered language translation information.
source§

fn clear_tags(&self)

Remove all tags associated with this component.
source§

fn addons(&self) -> Vec<Component>

Returns a list of Component objects which are addons extending this component in functionality. Read more
source§

fn agreement_by_kind(&self, kind: AgreementKind) -> Option<Agreement>

Gets an agreement the component has specified for the particular kind. Read more
source§

fn agreements(&self) -> Vec<Agreement>

Get a list of all agreements registered with this software component. Read more
source§

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

Gets the branch for the application. Read more
source§

fn branding(&self) -> Option<Branding>

Get the branding associated with this component, or None in case this component has no special branding. Read more
source§

fn bundle(&self, bundle_kind: BundleKind) -> Option<Bundle>

Gets a bundle identifier string. Read more
source§

fn bundles(&self) -> Vec<Bundle>

Get a list of all software bundles associated with this component. Read more
source§

fn categories(&self) -> Vec<GString>

Returns Read more
source§

fn compulsory_for_desktops(&self) -> Vec<GString>

Returns Read more
source§

fn content_rating(&self, kind: &str) -> Option<ContentRating>

Gets a content ratings of a specific type that are defined for this component. Read more
source§

fn content_ratings(&self) -> Vec<ContentRating>

Gets all content ratings defined for this software. Read more
source§

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

Get the Context associated with this component. This function may return None if no context is set (which will be the case if the component was not loaded from a file or cache but constructed in memory). Read more
source§

fn custom_value(&self, key: &str) -> Option<GString>

Retrieve value for a custom data entry with the given key. Read more
source§

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. Read more
source§

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

Gets the end-of-life date for the entire component. Read more
source§

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

Get the localized long description of this component. Read more
source§

fn extends(&self) -> Vec<GString>

Returns a string list of IDs of components which are extended by this addon. Read more
source§

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. Read more
source§

fn icon_stock(&self) -> Option<Icon>

Gets a stock icon for this component if one is associated with it. Will return None otherwise. Read more
source§

fn icons(&self) -> Vec<Icon>

Returns Read more
source§

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

Get the unique AppStream identifier for this component. This ID is unique for the described component, but does not uniquely identify the metadata set. Read more
source§

fn keywords(&self) -> Vec<GString>

Returns Read more
source§

fn kind(&self) -> ComponentKind

Returns the ComponentKind of this component. Read more
source§

fn language(&self, locale: Option<&str>) -> i32

Gets the translation coverage in percent for a specific locale Read more
source§

fn languages(&self) -> Vec<GString>

Get a list of all languages. Read more
source§

fn launchable(&self, kind: LaunchableKind) -> Option<Launchable>

Gets a Launchable of a specific type that contains launchable entries for this component. Read more
source§

fn launchables(&self) -> Vec<Launchable>

Returns Read more
source§

fn merge_kind(&self) -> MergeKind

Get the merge method which should apply to duplicate components with this ID. Read more
source§

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

The license the metadata iself is subjected to. Read more
source§

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

A human-readable name for this component. Read more
source§

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). Read more
source§

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

source§

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. Read more
source§

fn pkgnames(&self) -> Vec<GString>

Get a list of package names which this component consists of. This usually is just one package name. Read more
source§

fn priority(&self) -> i32

Returns the priority of this component. This method is used internally.
source§

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

Get the component’s project group. Read more
source§

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

Get the license of the project this component belongs to. Read more
source§

fn provided(&self) -> Vec<Provided>

Get a list of Provided objects associated with this component. Read more
source§

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. Read more
source§

fn recommends(&self) -> Vec<Relation>

Get an array of items that are recommended by this component. Read more
source§

fn releases_plain(&self) -> Option<ReleaseList>

Get release information for this component, without downloading or loading any data from external sources. Read more
source§

fn replaces(&self) -> Vec<GString>

Get a list of component IDs of components that this software replaces entirely. Read more
source§

fn requires(&self) -> Vec<Relation>

Get an array of items that are required by this component. Read more
source§

fn reviews(&self) -> Vec<Review>

Gets any reviews associated with the component. Read more
source§

fn scope(&self) -> ComponentScope

Returns Read more
source§

fn screenshots_all(&self) -> Vec<Screenshot>

Get a list of all associated screenshots, for all environments. Read more
source§

fn search_tokens(&self) -> Vec<GString>

Returns all search tokens for this component. Read more
source§

fn sort_score(&self) -> u32

Returns the sorting priority of this component. Read more
source§

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

Returns Read more
source§

fn suggested(&self) -> Vec<Suggested>

Get a list of associated suggestions. Read more
source§

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

Get a short description of this component. Read more
source§

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. Read more
source§

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. Read more
source§

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. Read more
source§

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

Gets a URL. Read more
source§

fn has_bundle(&self) -> bool

Returns Read more
source§

fn has_category(&self, category: &str) -> bool

Check if component is in the specified category. Read more
source§

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

Test if the component is tagged with the selected tag. Read more
source§

fn insert_custom_value(&self, key: &str, value: &str) -> bool

Add a key and value pair to the custom data table. Read more
source§

fn is_compulsory_for_desktop(&self, desktop: &str) -> bool

Check if this component is compulsory for the given desktop. Read more
source§

fn is_floss(&self) -> bool

Returns true if this component is free and open source software. To determine this status, this function will check if it comes from a vetted free-software-only source or whether its licenses are only free software licenses. Read more
source§

fn is_ignored(&self) -> bool

Returns Read more
source§

fn is_member_of_category(&self, category: &impl IsA<Category>) -> bool

Test if the component self is a member of category category. Read more
source§

fn is_valid(&self) -> bool

Check if the essential properties of this Component are populated with useful data. Read more
source§

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. Read more
source§

fn load_releases(&self, allow_net: bool) -> Result<Option<ReleaseList>, Error>

Get release information for this component, download it if necessary. Read more
source§

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

Remove a tag from this component Read more
source§

fn search_matches(&self, term: &str) -> u32

Searches component data for a specific keyword. Read more
source§

fn set_branch(&self, branch: &str)

Set the branch that the component instance was sourced from. Read more
source§

fn set_branding(&self, branding: &impl IsA<Branding>)

Set branding for this component. Read more
source§

fn set_compulsory_for_desktop(&self, desktop: &str)

Mark this component to be compulsory for the specified desktop environment. Read more
source§

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

Sets the document context this component is associated with. Read more
source§

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. Read more
source§

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. Read more
source§

fn set_date_eol(&self, date: &str)

Sets an end-of-life date for this component. Read more
source§

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

Set long description for this component. Read more
source§

fn set_id(&self, value: &str)

Set the AppStream identifier for this component. Read more
source§

fn set_keywords( &self, new_keywords: &[&str], locale: Option<&str>, deep_copy: bool, )

Set keywords for this component, replacing all existing ones for the selected locale. Read more
source§

fn set_kind(&self, value: ComponentKind)

Sets the ComponentKind of this component. Read more
source§

fn set_merge_kind(&self, kind: MergeKind)

Sets the MergeKind for this component. Read more
source§

fn set_metadata_license(&self, value: &str)

Set the license this metadata is licensed under. Read more
source§

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

Set a human-readable name for this component. Read more
source§

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

Set a variant suffix for the component name (only to be displayed if components have the same name). Read more
source§

fn set_origin(&self, origin: &str)

origin Read more
source§

fn set_pkgname(&self, pkgname: &str)

Set the package name that provides this component. Read more
source§

fn set_pkgnames(&self, packages: &[&str])

Set a list of package names this component consists of. (This should usually be just one package name)
source§

fn set_priority(&self, priority: i32)

Sets the priority of this component. This method is used internally. Read more
source§

fn set_project_group(&self, value: &str)

Set the component’s project group. Read more
source§

fn set_project_license(&self, value: &str)

Set the project license. Read more
source§

fn set_releases(&self, releases: &impl IsA<ReleaseList>)

Set a new set of releases for this component. Read more
source§

fn set_scope(&self, scope: ComponentScope)

Sets the ComponentScope of this component. Read more
source§

fn set_sort_score(&self, score: u32)

Sets the sorting score of this component. Read more
source§

fn set_source_pkgname(&self, spkgname: &str)

spkgname Read more
source§

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

Set a short description for this component. Read more
source§

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. Read more
source§

fn to_str(&self) -> GString

Returns a string identifying this component. (useful for debugging) Read more
source§

fn to_xml_data(&self, context: &impl IsA<Context>) -> Result<GString, Error>

Serialize this component into an XML string. You normally do not want to use this method directly and instead use the more convenient API of Metadata to serialize components. Read more
source§

fn connect_categories_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source§

fn connect_description_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source§

fn connect_icons_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source§

fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source§

fn connect_keywords_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source§

fn connect_kind_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source§

fn connect_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source§

fn connect_pkgnames_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source§

fn connect_project_group_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source§

fn connect_project_license_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source§

fn connect_screenshots_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source§

fn connect_summary_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source§

fn connect_urls_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(_: *const GList, _: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GList, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GPtrArray, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec( _: *const GPtrArray, _: usize, ) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GPtrArray, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(_: *const GSList, _: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GSList, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GPtrArray, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec( ptr: *mut GPtrArray, num: usize, ) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GPtrArray, num: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>

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.

source§

impl<T> IntoClosureReturnValue for T
where T: Into<Value>,

source§

impl<U> IsSubclassableExt for U

source§

impl<T> ObjectExt for T
where T: ObjectType,

source§

fn is<U>(&self) -> bool
where U: StaticType,

Returns true if the object is an instance of (can be cast to) T.
source§

fn type_(&self) -> Type

Returns the type of the object.
source§

fn object_class(&self) -> &Class<Object>

Returns the ObjectClass of the object. Read more
source§

fn class(&self) -> &Class<T>
where T: IsClass,

Returns the class of the object.
source§

fn class_of<U>(&self) -> Option<&Class<U>>
where U: IsClass,

Returns the class of the object in the given type T. Read more
source§

fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>
where U: IsInterface,

Returns the interface T of the object. Read more
source§

fn set_property(&self, property_name: &str, value: impl Into<Value>)

Sets the property property_name of the object to value value. Read more
source§

fn set_property_from_value(&self, property_name: &str, value: &Value)

Sets the property property_name of the object to value value. Read more
source§

fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])

Sets multiple properties of the object at once. Read more
source§

fn set_properties_from_value(&self, property_values: &[(&str, Value)])

Sets multiple properties of the object at once. Read more
source§

fn property<V>(&self, property_name: &str) -> V
where V: for<'b> FromValue<'b> + 'static,

Gets the property property_name of the object and cast it to the type V. Read more
source§

fn property_value(&self, property_name: &str) -> Value

Gets the property property_name of the object. Read more
source§

fn has_property(&self, property_name: &str, type_: Option<Type>) -> bool

Check if the object has a property property_name of the given type_. Read more
source§

fn property_type(&self, property_name: &str) -> Option<Type>

Get the type of the property property_name of this object. Read more
source§

fn find_property(&self, property_name: &str) -> Option<ParamSpec>

Get the ParamSpec of the property property_name of this object.
source§

fn list_properties(&self) -> PtrSlice<ParamSpec>

Return all ParamSpec of the properties of this object.
source§

fn freeze_notify(&self) -> PropertyNotificationFreezeGuard

Freeze all property notifications until the return guard object is dropped. Read more
source§

unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)
where QD: 'static,

Set arbitrary data on this object with the given key. Read more
source§

unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>
where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
source§

unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>
where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
source§

unsafe fn set_data<QD>(&self, key: &str, value: QD)
where QD: 'static,

Set arbitrary data on this object with the given key. Read more
source§

unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>
where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
source§

unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>
where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
source§

fn block_signal(&self, handler_id: &SignalHandlerId)

Block a given signal handler. Read more
source§

fn unblock_signal(&self, handler_id: &SignalHandlerId)

Unblock a given signal handler.
source§

fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)

Stop emission of the currently emitted signal.
source§

fn stop_signal_emission_by_name(&self, signal_name: &str)

Stop emission of the currently emitted signal by the (possibly detailed) signal name.
source§

fn connect<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_name on this object. Read more
source§

fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_id on this object. Read more
source§

fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_name on this object. Read more
source§

fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_id on this object. Read more
source§

unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_name on this object. Read more
source§

unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_id on this object. Read more
source§

fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure, ) -> SignalHandlerId

Connect a closure to the signal signal_name on this object. Read more
source§

fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure, ) -> SignalHandlerId

Connect a closure to the signal signal_id on this object. Read more
source§

fn watch_closure(&self, closure: &impl AsRef<Closure>)

Limits the lifetime of closure to the lifetime of the object. When the object’s reference count drops to zero, the closure will be invalidated. An invalidated closure will ignore any calls to invoke_with_values, or invoke when using Rust closures.
source§

fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> R

Emit signal by signal id. Read more
source§

fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>

Same as Self::emit but takes Value for the arguments.
source§

fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> R

Emit signal by its name. Read more
source§

fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value], ) -> Option<Value>

Emit signal by its name. Read more
source§

fn emit_by_name_with_details<R>( &self, signal_name: &str, details: Quark, args: &[&dyn ToValue], ) -> R

Emit signal by its name with details. Read more
source§

fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value], ) -> Option<Value>

Emit signal by its name with details. Read more
source§

fn emit_with_details<R>( &self, signal_id: SignalId, details: Quark, args: &[&dyn ToValue], ) -> R

Emit signal by signal id with details. Read more
source§

fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value], ) -> Option<Value>

Emit signal by signal id with details. Read more
source§

fn disconnect(&self, handler_id: SignalHandlerId)

Disconnect a previously connected signal handler.
source§

fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + Send + Sync + 'static,

Connect to the notify signal of the object. Read more
source§

fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + 'static,

Connect to the notify signal of the object. Read more
source§

unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
where F: Fn(&T, &ParamSpec),

Connect to the notify signal of the object. Read more
source§

fn notify(&self, property_name: &str)

Notify that the given property has changed its value. Read more
source§

fn notify_by_pspec(&self, pspec: &ParamSpec)

Notify that the given property has changed its value. Read more
source§

fn downgrade(&self) -> WeakRef<T>

Downgrade this object to a weak reference.
source§

fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
where F: FnOnce() + Send + 'static,

Add a callback to be notified when the Object is disposed.
source§

fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>
where F: FnOnce() + 'static,

Add a callback to be notified when the Object is disposed. Read more
source§

fn bind_property<'a, 'f, 't, O>( &'a self, source_property: &'a str, target: &'a O, target_property: &'a str, ) -> BindingBuilder<'a, 'f, 't>
where O: ObjectType,

Bind property source_property on this object to the target_property on the target object. Read more
source§

fn ref_count(&self) -> u32

Returns the strong reference count of this object.
source§

unsafe fn run_dispose(&self)

Runs the dispose mechanism of the object. Read more
source§

impl<T> Property for T
where T: HasParamSpec,

source§

type Value = T

source§

impl<T> PropertyGet for T
where T: HasParamSpec,

source§

type Value = T

source§

fn get<R, F>(&self, f: F) -> R
where F: Fn(&<T as PropertyGet>::Value) -> R,

source§

impl<T> StaticTypeExt for T
where T: StaticType,

source§

fn ensure_type()

Ensures that the type has been registered with the type system.
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T> TransparentType for T

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> TryFromClosureReturnValue for T
where T: for<'a> FromValue<'a> + StaticType + 'static,

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

impl<'a, T, C, E> FromValueOptional<'a> for T
where T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,

source§

impl<Super, Sub> MayDowncastTo<Sub> for Super
where Super: IsA<Super>, Sub: IsA<Super>,