Skip to main content

ObjectHandler

Trait ObjectHandler 

Source
pub trait ObjectHandler: Send + Sync {
    // Required method
    fn handle(&self, call: &Message) -> Result<Vec<Value>, (String, String)>;
}
Expand description

Handles inbound method calls on an exported object.

Returning Err((name, text)) sends a D-Bus error reply.

Required Methods§

Source

fn handle(&self, call: &Message) -> Result<Vec<Value>, (String, String)>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F> ObjectHandler for F
where F: Fn(&Message) -> Result<Vec<Value>, (String, String)> + Send + Sync,