Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(zenoh-flow-nodes): provide accessors on
LinkMessage
Writing the Python bindings highlighted a tiny nuisance of the `Deref` trait: in order to access a Payload, an explicit turbofished call to Deref was required, which was not particularly ergonomic. This commit introduces accessors for both the `payload` and `timestamp` fields of a `LinkMessage`. The method `get_timestamp` was deprecated in favour of `timestamp`. This change is purely aesthetic and for coherence purposes. * zenoh-flow-nodes/src/messages.rs: - removed the implementation of the Deref trait, - added an accessor `payload()`, - added an accessor `timestamp()`, - deprecated the accessor `get_timestamp()` in favour of `timestamp()`. * zenoh-flow-runtime/src/runners/builtin/zenoh/sink.rs: as the Deref trait is no longer implemented on `LinkMessage`, a call to `payload()` is required. Signed-off-by: Julien Loudet <julien.loudet@zettascale.tech>
- Loading branch information