Trait zbus::Interface[][src]

pub trait Interface: Any {
    fn name() -> &'static str
    where
        Self: Sized
;
fn get(&self, property_name: &str) -> Option<Result<OwnedValue>>;
fn get_all(&self) -> HashMap<String, OwnedValue>;
fn set(
        &mut self,
        property_name: &str,
        value: &Value<'_>
    ) -> Option<Result<()>>;
fn call(
        &self,
        connection: &Connection,
        msg: &Message,
        name: &str
    ) -> Option<Result<u32>>;
fn call_mut(
        &mut self,
        connection: &Connection,
        msg: &Message,
        name: &str
    ) -> Option<Result<u32>>;
fn introspect_to_writer(&self, writer: &mut dyn Write, level: usize); }
Expand description

The trait used to dispatch messages to an interface instance.

Note: It is not recommended to manually implement this trait. The dbus_interface macro implements it for you.

Required methods

Return the name of the interface. Ex: “org.foo.MyInterface”

Get a property value. Returns None if the property doesn’t exist.

Return all the properties.

Set a property value. Returns None if the property doesn’t exist.

Call a &self method. Returns None if the method doesn’t exist.

Call a &mut self method. Returns None if the method doesn’t exist.

Write introspection XML to the writer, with the given indentation level.

Implementors