[][src]Trait zbus::Interface

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

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

pub fn name() -> &'static str where
    Self: Sized
[src]

Return the name of the interface. Ex: "org.foo.MyInterface"

pub fn get(&self, property_name: &str) -> Option<Result<OwnedValue>>[src]

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

pub fn get_all(&self) -> HashMap<String, OwnedValue>[src]

Return all the properties.

pub fn set(
    &mut self,
    property_name: &str,
    value: &Value<'_>
) -> Option<Result<()>>
[src]

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

pub fn call(
    &self,
    connection: &Connection,
    msg: &Message,
    name: &str
) -> Option<Result<u32>>
[src]

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

pub fn call_mut(
    &mut self,
    connection: &Connection,
    msg: &Message,
    name: &str
) -> Option<Result<u32>>
[src]

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

pub fn introspect_to_writer(&self, writer: &mut dyn Write, level: usize)[src]

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

Loading content...

Implementors

Loading content...