Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1.8 KB

CHANGELOG.md

File metadata and controls

49 lines (31 loc) · 1.8 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[0.2.1] - 16-12-2023

Misc

  • Bump syn dependency to v2.

[0.2.0] - 31-05-2022

Changed

  • Refactor structure of public API and rename derive macros.

[0.1.0] - 30-12-2021

This is the first MVP release of the inter-struct library.

It's purpose is to implement traits between various structs.

Added

Traits:

  • StructMerge trait which implements functions to merge a given struct into Self.
  • StructMergeInto trait. The counterpart of StructMerge which merges Self into a target struct. StructMerge is automatically implemented.
  • StructMergeRef trait which implements functions to merge a reference of given struct into Self. The fields to be merged then need to implement Clone.
  • StructMergeIntoRef trait. The counterpart of StructMergeRef, which merges &Self into a target struct. StructMergeRef is automatically implemented.

Derive Macro:

  • InterStruct The main derive macro for this crate.

Derive Macro Attributes:

  • merge attribute for generating StructMergeInto and the auto-implemented StructMerge implementations.
  • merge_ref attribute for generating the StructMergeRefInto and the auto-implemented StructMergeRef implementations.
  • into attribute for generating std::convert::From and the auto-implemented std::convert::Into implementations.
  • into_default attribute for generating std::convert::From and the auto-implemented std::convert::Into implementations. This populates all non-matching fields by calling Default::default for the target struct.