Skip to main content

DBusObjectExt

Trait DBusObjectExt 

Source
pub trait DBusObjectExt: IsA<DBusObject> + '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>(&self, f: F) -> SignalHandlerId
       where F: Fn(&Self, &DBusInterface) + 'static { ... }
    fn connect_interface_removed<F>(&self, f: F) -> SignalHandlerId
       where F: Fn(&Self, &DBusInterface) + 'static { ... }
}
Expand description

Trait containing all DBusObject methods.

§Implementors

DBusObjectProxy, DBusObjectSkeleton, 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>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self, &DBusInterface) + 'static,

Emitted when @interface is added to @object.

§interface

The #GDBusInterface that was added.

Source

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

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".

Implementors§

Source§

impl<O> DBusObjectExt for O
where O: IsA<DBusObject>,