Skip to content

Conversation

@TrueDoctor
Copy link
Member

No description provided.

@Keavon Keavon changed the title Migrate memo nodes to node macro and make implementing other memo nodes easier Migrate memo nodes to node macro and make implementing other persistent nodes easier Jan 5, 2026
TrueDoctor and others added 6 commits January 5, 2026 22:11
- Add #[data] attribute for struct fields that aren't node parameters
  - Data fields are initialized with Default::default()
  - Passed as references to the underlying function
  - Excluded from registry metadata (internal state)
  - Generic types in data fields allowed without #[implementations]

- Add #[serialize] attribute for custom Node::serialize() implementation
  - Receives references to all data fields
  - Generates serialize() method in Node trait impl

- Conditional derives based on data field presence
  - With data fields: Debug, Clone only
  - Without data fields: Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
@TrueDoctor TrueDoctor merged commit fafc687 into master Jan 5, 2026
4 checks passed
@TrueDoctor TrueDoctor deleted the memo-macro branch January 5, 2026 21:28
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.

3 participants