Struct dbus::tree::Tree [] [src]

pub struct Tree<M> {
    // some fields omitted
}

A collection of object paths.

Methods

impl<M: MethodType> Tree<M>
[src]

fn add(self, p: ObjectPath<M>) -> Self

Add an Object Path to this Tree.

Note: This does not unregister a path with the connection, so if the tree is currently registered, you might want to call Connection::register_object_path to add the path manually.

fn add_o_ref(&mut self, p: ObjectPath<M>) -> Arc<ObjectPath<M>>

Adds an ObjectPath to this Tree. Returns a reference to the ObjectPath. The note for add() also applies here.

fn remove(&mut self, p: &Path<'static>) -> Option<Arc<ObjectPath<M>>>

Remove a object path from the Tree. Returns the object path removed, or None if not found.

Note: This does not unregister a path with the connection, so if the tree is currently registered, you might want to call Connection::unregister_object_path to remove the path manually.

fn set_registered(&self, c: &Connection, b: bool) -> Result<(), Error>

Registers or unregisters all object paths in the tree.

fn handle(&self, m: &Message) -> Option<Vec<Message>>

Handles a message. Will return None in case the object path was not found, or otherwise a list of messages to be sent back.

fn run<'a, I: Iterator<Item=ConnectionItem>>(&'a self, c: &'a Connection, i: I) -> TreeServer<'a, I, M>

This method takes an ConnectionItem iterator (you get it from Connection::iter()) and handles all matching items. Non-matching items (e g signals) are passed through.

Trait Implementations

Derived Implementations

impl<M: Debug> Debug for Tree<M>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result