Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(zenoh-flow-nodes): provide accessors on LinkMessage #256

Merged
merged 1 commit into from
Jun 4, 2024

Commits on Jun 4, 2024

  1. 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 <[email protected]>
    J-Loudet committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    a792616 View commit details
    Browse the repository at this point in the history