Skip to content

Commit

Permalink
Merge pull request #383 from Taha-Firoz/property-caching-faq-nitpicks
Browse files Browse the repository at this point in the history
✏️ Adding and updating doc urls
  • Loading branch information
zeenix authored Feb 14, 2024
2 parents 6db318b + c9a6d8c commit d4cee9b
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions book/src/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,15 @@ update accordingly.

However, you can disabling caching for specific properties:

- Add the `#[zbus(property(emits_changed_signal = "false"))]` annotation to the property
for which you desire to disable caching on.
- Add the `#[zbus(property(emits_changed_signal = "false"))]` annotation to the property for which
you desire to disable caching on. For more information about all the possible values for
`emits_changed_signal` refer to [`proxy`] documentation.

- Use `proxy::Builder` to build your proxy instance and use `proxy::Builder::uncached_properties` method
to list all properties you wish to disable caching for.
- Use `proxy::Builder` to build your proxy instance and use [`proxy::Builder::uncached_properties`]
method to list all properties you wish to disable caching for.

- In order to disable caching for either type of proxy use the `proxy::Builder::cache_properites`
method.

For more information about all the possible values for `emits_changed_signal` refer
to [`proxy`](https://docs.rs/zbus/latest/zbus/attr.proxy.html) documentation.
- In order to disable caching for either type of proxy use the [`proxy::Builder::cache_properites`]
method.

## How do I use `Option<T>`` with zbus?

Expand Down Expand Up @@ -149,6 +147,9 @@ enabled.

**Note**: We hope to be able to remove #2 and #4, once [specialization] lands in stable Rust.

[`proxy::Builder::uncached_properties`]: https://docs.rs/zbus/latest/zbus/proxy/struct.Builder.html#method.uncached_properties
[`proxy::Builder::cache_properites`]: https://docs.rs/zbus/latest/zbus/proxy/struct.Builder.html#method.cache_properties
[`proxy`]: https://docs.rs/zbus/latest/zbus/attr.proxy.html
[tctiog]: https://github.com/tokio-rs/tokio/issues/2201
[`Type`]: https://docs.rs/zvariant/latest/zvariant/derive.Type.html
[`SerializeDict`]: https://docs.rs/zvariant/latest/zvariant/derive.SerializeDict.html
Expand All @@ -158,4 +159,4 @@ enabled.
[dsi]: http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces
[`Optional<T>`]: https://docs.rs/zvariant/latest/zvariant/struct.Optional.html
[`d-feet`]: https://wiki.gnome.org/Apps/DFeet
[specialization]: https://rust-lang.github.io/rfcs/1210-impl-specialization.html
[specialization]: https://rust-lang.github.io/rfcs/1210-impl-specialization.html

0 comments on commit d4cee9b

Please sign in to comment.