Skip to content

Conversation

@teresi
Copy link
Contributor

@teresi teresi commented Dec 3, 2025

  • derive Clone so one can duplicate it for another owner
  • derive PartialEq to test if components differ
  • derive Debug for printing

Summary

I added some common traits to make it easier to work with EcalComponents

The main one is Clone so you can send a duplicate to another thread for example (bitflags appears to need clone, not copy)

Related Issues / Discussions

No relevant issues

Checklist

  • I have tested this change locally
  • I have documented any public APIs or CLI changes
  • I have added appropriate examples or comments
  • The code builds and passes all checks (cargo check, cargo test)
  • I have updated the changelog if applicable

Screenshots / Output (if applicable)

the debug output looks like this, for DEFAULT in this example

EcalComponents(PUBLISHER | SUBSCRIBER | SERVICE | LOGGING | TIMESYNC)

@teresi teresi force-pushed the f/component_traits branch from 5614a94 to 8332f2f Compare December 3, 2025 14:48
- derive Clone so one can duplicate it for another owner
- derive PartialEq to test if components differ
- derive Debug for printing
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the EcalComponents bitflags struct by deriving three standard Rust traits to improve usability and ergonomics when working with eCAL component configurations.

  • Adds Clone trait to enable duplication of components for use across threads
  • Adds PartialEq trait to enable comparison of component configurations
  • Adds Debug trait to enable formatted printing and debugging

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rex-schilasky
Copy link
Collaborator

Thank you @teresi !

@rex-schilasky rex-schilasky merged commit a85eca5 into eclipse-ecal:main Dec 4, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants