You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Callbacks run in background until session is closed
111
-
112
-
Session entities, e.g. subscribers, declared with callbacks are no more undeclared when they are dropped; there is no more need to keep a variable around when the intent is to have it run until the session is closed.
// subscriber run in background until the session is closed
122
-
// no need to keep a variable around
123
-
```
124
-
125
-
If you still want the entity to be undeclared when dropped, you can simply use `with` instead of `callback`; it may just require you to annotate the callback, as type inference is not as good as with `callback` method.
*Going into details, a new method `undeclare_on_drop(bool)` – default to `true`, has been added to the builders, and `callback(cb)` is now simply a shortcut to `with(cb).undeclare_on_drop(false)`. You should rarely need to call this method directly however.*
139
-
140
110
## Value is gone, long live ZBytes
141
111
142
112
We have replaced `Value` with `ZBytes` and `Encoding` , and added a number of conversion implementations such that user structs can be serialized into `ZBytes`, sent via Zenoh, and de-serialized from `ZBytes` with ease.
0 commit comments