Skip to content

Allow raw access to cached properties & more control over caching

Zeeshan Ali Khan requested to merge zeenix/zbus:prop-cache-improvements into main

Two main changes in this MR:

  1. Provide access to cached properties as &Value (more like impl Deref<Target = Value>) to allow users to access the value w/o cloning/allocation.
  2. Instead of a boolean to enable and disable properties caching, allow specifying whether to cache them upfront, lazily (on the first read) or not at all. The new enum is declared non_exhaustive to easily allow any other mode we might want in the future w/o break the API.

Fixes #184 (closed).

Merge request reports