Struct dbus::tree::Property[][src]

pub struct Property<M: MethodType<D>, D: DataType> { /* fields omitted */ }

A D-Bus Property.

Methods

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

Builder method that allows setting the Property's signal behavior when changed.

Note: if e is set to const, the property will be read only.

Builder method that determines whether or not setting this property will result in an PropertiesChanged signal. Defaults to true.

When set to true (the default), the behaviour is determined by "emits_changed". When set to false, no PropertiesChanged signal will be emitted (but the signal still shows up in introspection data). You can still emit the signal manually by, e g, calling add_propertieschanged and send the resulting message(s).

Builder method that allows setting the Property as readable, writable, or both.

Note: might modify emits_changed as well, if property is changed to non-readonly and emit is set to "Const".

Builder method that adds an annotation to the method.

Builder method that adds an annotation that this entity is deprecated.

Get property name

Get associated data

Returns Ok if the property is gettable

Calls the on_get function and appends the result as a variant.

Note: Will panic if get_cb is not set.

Returns Ok if the property is settable.

Will verify signature in case iter is not None; iter is supposed to point at the Variant with the item inside.

Calls the on_set function, which reads from i.

The return value might contain an extra message containing the EmitsChanged signal. Note: Will panic if set_cb is not set.

Adds this property to a list of PropertiesChanged signals.

"v" is updated with the signal for this property. "new_value" is only called if self.emits is "true", it should return the value of the property. If no PropertiesChanged signal should be emitted for this property, "v" is left unchanged.

impl<'a, D: DataType> Property<MTFn<D>, D>
[src]

Sets the callback for getting a property.

For single-thread use.

Sets the callback for setting a property.

For single-thread use.

impl<'a, D: DataType> Property<MTFnMut<D>, D>
[src]

Sets the callback for getting a property.

For single-thread use.

Sets the callback for setting a property.

For single-thread use.

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

Sets the callback for getting a property.

For multi-thread use.

Sets the callback for setting a property.

For single-thread use.

impl<M: MethodType<D>, D: DataType> Property<M, D> where
    D::Property: Append + Clone
[src]

Adds a "standard" get handler.

impl<M: MethodType<D>, D: DataType> Property<M, D> where
    D::Property: RefArg
[src]

Adds a "standard" get handler (for RefArgs).

Trait Implementations

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<M, D> Send for Property<M, D> where
    <M as MethodType<D>>::GetProp: Send,
    <D as DataType>::Property: Send,
    <M as MethodType<D>>::SetProp: Send

impl<M, D> Sync for Property<M, D> where
    <M as MethodType<D>>::GetProp: Sync,
    <D as DataType>::Property: Sync,
    <M as MethodType<D>>::SetProp: Sync