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.
- Bump
syn
dependency tov2
.
- Refactor structure of public API and rename derive macros.
This is the first MVP release of the inter-struct
library.
It's purpose is to implement traits between various structs.
StructMerge
trait which implements functions to merge a given struct intoSelf
.StructMergeInto
trait. The counterpart ofStructMerge
which mergesSelf
into a target struct.StructMerge
is automatically implemented.StructMergeRef
trait which implements functions to merge a reference of given struct intoSelf
. The fields to be merged then need to implementClone
.StructMergeIntoRef
trait. The counterpart ofStructMergeRef
, which merges&Self
into a target struct.StructMergeRef
is automatically implemented.
InterStruct
The main derive macro for this crate.
merge
attribute for generatingStructMergeInto
and the auto-implementedStructMerge
implementations.merge_ref
attribute for generating theStructMergeRefInto
and the auto-implementedStructMergeRef
implementations.into
attribute for generatingstd::convert::From
and the auto-implementedstd::convert::Into
implementations.into_default
attribute for generatingstd::convert::From
and the auto-implementedstd::convert::Into
implementations. This populates all non-matching fields by callingDefault::default
for the target struct.