gio::prelude

Trait DBusObjectExt

Source
pub trait DBusObjectExt:
    IsA<DBusObject>
    + Sealed
    + 'static {
    // Provided methods
    fn interface(&self, interface_name: &str) -> Option<DBusInterface> { ... }
    fn interfaces(&self) -> Vec<DBusInterface> { ... }
    fn object_path(&self) -> GString { ... }
    fn connect_interface_added<F: Fn(&Self, &DBusInterface) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
    fn connect_interface_removed<F: Fn(&Self, &DBusInterface) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all DBusObject methods.

§Implementors

DBusObject

Provided Methods§

Source

fn interface(&self, interface_name: &str) -> Option<DBusInterface>

Gets the D-Bus interface with name @interface_name associated with @self, if any.

§interface_name

A D-Bus interface name.

§Returns

None if not found, otherwise a #GDBusInterface that must be freed with g_object_unref().

Source

fn interfaces(&self) -> Vec<DBusInterface>

Gets the D-Bus interfaces associated with @self.

§Returns

A list of #GDBusInterface instances. The returned list must be freed by g_list_free() after each element has been freed with g_object_unref().

Source

fn object_path(&self) -> GString

Gets the object path for @self.

§Returns

A string owned by @self. Do not free.

Source

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

Emitted when @interface is added to @object.

§interface

The #GDBusInterface that was added.

Source

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

Emitted when @interface is removed from @object.

§interface

The #GDBusInterface that was removed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§