Struct dbus::tree::Tree [−][src]
pub struct Tree<M: MethodType<D>, D: DataType> { /* fields omitted */ }
A collection of object paths.
Methods
impl<M: MethodType<D>, D: DataType> Tree<M, D>
[src]
impl<M: MethodType<D>, D: DataType> Tree<M, D>
pub fn add<I: Into<Arc<ObjectPath<M, D>>>>(self, s: I) -> Self
[src]
pub fn add<I: Into<Arc<ObjectPath<M, D>>>>(self, s: I) -> Self
Builder function that adds an object path to this tree.
Note: This does not register 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.
pub fn get(&self, p: &Path<'static>) -> Option<&Arc<ObjectPath<M, D>>>
[src]
pub fn get(&self, p: &Path<'static>) -> Option<&Arc<ObjectPath<M, D>>>
Get a reference to an object path from the tree.
ⓘImportant traits for Iter<'a, V>pub fn iter<'a>(&'a self) -> Iter<'a, ObjectPath<M, D>>
[src]
pub fn iter<'a>(&'a self) -> Iter<'a, ObjectPath<M, D>>
Iterates over object paths in this tree.
pub fn insert<I: Into<Arc<ObjectPath<M, D>>>>(&mut self, s: I)
[src]
pub fn insert<I: Into<Arc<ObjectPath<M, D>>>>(&mut self, s: I)
Non-builder function that adds an object path to this tree.
Note: This does not register 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.
pub fn remove(&mut self, p: &Path<'static>) -> Option<Arc<ObjectPath<M, D>>>
[src]
pub fn remove(&mut self, p: &Path<'static>) -> Option<Arc<ObjectPath<M, D>>>
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.
pub fn set_registered(&self, c: &Connection, b: bool) -> Result<(), Error>
[src]
pub fn set_registered(&self, c: &Connection, b: bool) -> Result<(), Error>
Registers or unregisters all object paths in the tree.
ⓘImportant traits for TreeServer<'a, I, M, D>pub fn run<'a, I: Iterator<Item = ConnectionItem>>(
&'a self,
c: &'a Connection,
i: I
) -> TreeServer<'a, I, M, D>
[src]
pub fn run<'a, I: Iterator<Item = ConnectionItem>>(
&'a self,
c: &'a Connection,
i: I
) -> TreeServer<'a, I, M, D>
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.
pub fn handle(&self, m: &Message) -> Option<Vec<Message>>
[src]
pub fn handle(&self, m: &Message) -> Option<Vec<Message>>
Handles a message.
Will return None in case the object path was not found in this tree, or otherwise a list of messages to be sent back.
pub fn get_data(&self) -> &D::Tree
[src]
pub fn get_data(&self) -> &D::Tree
Get associated data
Trait Implementations
impl<M: Debug + MethodType<D>, D: Debug + DataType> Debug for Tree<M, D> where
D::Tree: Debug,
[src]
impl<M: Debug + MethodType<D>, D: Debug + DataType> Debug for Tree<M, D> where
D::Tree: Debug,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<M: Default + MethodType<D>, D: Default + DataType> Default for Tree<M, D> where
D::Tree: Default,
[src]
impl<M: Default + MethodType<D>, D: Default + DataType> Default for Tree<M, D> where
D::Tree: Default,
impl<M: MethodType<D>, D: DataType> MsgHandler for Tree<M, D>
[src]
impl<M: MethodType<D>, D: DataType> MsgHandler for Tree<M, D>
fn handle_msg(&mut self, msg: &Message) -> Option<MsgHandlerResult>
[src]
fn handle_msg(&mut self, msg: &Message) -> Option<MsgHandlerResult>
Function to be called if the message matches the MsgHandlerType
fn handler_type(&self) -> MsgHandlerType
[src]
fn handler_type(&self) -> MsgHandlerType
Type of messages for which the handler will be called Read more
Auto Trait Implementations
impl<M, D> Send for Tree<M, D> where
<M as MethodType<D>>::GetProp: Send + Sync,
<D as DataType>::Interface: Send + Sync,
<D as DataType>::Method: Send + Sync,
<M as MethodType<D>>::Method: Send + Sync,
<D as DataType>::ObjectPath: Send + Sync,
<D as DataType>::Property: Send + Sync,
<M as MethodType<D>>::SetProp: Send + Sync,
<D as DataType>::Signal: Send + Sync,
<D as DataType>::Tree: Send,
impl<M, D> Send for Tree<M, D> where
<M as MethodType<D>>::GetProp: Send + Sync,
<D as DataType>::Interface: Send + Sync,
<D as DataType>::Method: Send + Sync,
<M as MethodType<D>>::Method: Send + Sync,
<D as DataType>::ObjectPath: Send + Sync,
<D as DataType>::Property: Send + Sync,
<M as MethodType<D>>::SetProp: Send + Sync,
<D as DataType>::Signal: Send + Sync,
<D as DataType>::Tree: Send,
impl<M, D> Sync for Tree<M, D> where
<M as MethodType<D>>::GetProp: Send + Sync,
<D as DataType>::Interface: Send + Sync,
<D as DataType>::Method: Send + Sync,
<M as MethodType<D>>::Method: Send + Sync,
<D as DataType>::ObjectPath: Send + Sync,
<D as DataType>::Property: Send + Sync,
<M as MethodType<D>>::SetProp: Send + Sync,
<D as DataType>::Signal: Send + Sync,
<D as DataType>::Tree: Sync,
impl<M, D> Sync for Tree<M, D> where
<M as MethodType<D>>::GetProp: Send + Sync,
<D as DataType>::Interface: Send + Sync,
<D as DataType>::Method: Send + Sync,
<M as MethodType<D>>::Method: Send + Sync,
<D as DataType>::ObjectPath: Send + Sync,
<D as DataType>::Property: Send + Sync,
<M as MethodType<D>>::SetProp: Send + Sync,
<D as DataType>::Signal: Send + Sync,
<D as DataType>::Tree: Sync,