Struct dbus::tree::Factory[][src]

pub struct Factory<M: MethodType<D>, D: DataType = ()>(_);

The factory is used to create object paths, interfaces, methods etc.

There are three factories:

MTFn - all methods are Fn().

MTFnMut - all methods are FnMut(). This means they can mutate their environment, which has the side effect that if you call it recursively, it will RefCell panic.

MTSync - all methods are Fn() + Send + Sync + 'static. This means that the methods can be called from different threads in parallel.

Methods

impl Factory<MTFn<()>, ()>
[src]

Creates a new factory for single-thread use.

Creates a new factory for single-thread use, where callbacks can mutate their environment.

Creates a new factory for multi-thread use.

impl<D: DataType> Factory<MTFn<D>, D>
[src]

Creates a new method for single-thread use.

impl<D: DataType> Factory<MTFnMut<D>, D>
[src]

Creates a new method for single-thread use.

impl<D: DataType> Factory<MTSync<D>, D>
[src]

Creates a new method for multi-thread use.

impl<M: MethodType<D>, D: DataType> Factory<M, D>
[src]

Creates a new property.

A is used to calculate the type signature of the property.

Creates a new signal.

Creates a new interface.

Creates a new object path.

Creates a new tree.

Creates a new method - usually you'll use "method" instead.

This is useful for being able to create methods in code which is generic over methodtype.

Trait Implementations

impl<M: Debug + MethodType<D>, D: Debug + DataType> Debug for Factory<M, D>
[src]

Formats the value using the given formatter. Read more

impl<M: Clone + MethodType<D>, D: Clone + DataType> Clone for Factory<M, D>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<M: MethodType<D>, D: DataType> From<Arc<IfaceCache<M, D>>> for Factory<M, D>
[src]

Performs the conversion.

Auto Trait Implementations

impl<M, D> Send for Factory<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>::Property: Send + Sync,
    <M as MethodType<D>>::SetProp: Send + Sync,
    <D as DataType>::Signal: Send + Sync

impl<M, D> Sync for Factory<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>::Property: Send + Sync,
    <M as MethodType<D>>::SetProp: Send + Sync,
    <D as DataType>::Signal: Send + Sync