Skip to content

Releases: CodeChain-io/intertrait

Deal w/ bindings of associated types in trait impl

Choose a tag to compare

@dynaxis dynaxis released this 17 Aug 15:32

When a target trait has associated types and #[cast_to] is attached to impl blocks of the trait, then the bindings were not properly handled (refer to #4 for details). This release fixes the problem.

Code/doc and macro output improvement

Choose a tag to compare

@dynaxis dynaxis released this 28 Oct 07:56

This release is a minor update:

  1. Some code and doc cleanups
  2. Dependency constraints have been lessened by specifying up to minor version constraints
  3. Macro outputs have been improved not to cause problems in various contexts (mainly using ::<crate> in paths rather than <crate>

Revamp APIs and support `Rc` and `Arc`

Choose a tag to compare

@dynaxis dynaxis released this 24 Apr 15:57

This release is incompatible with the previous 0.1.x ones, and completely revamped the APIs for beter ergonomics. The highlights are:

  • Support Rc and Arc
    • For Arc, the underlying type must be Sync + Send, use CastFromSync instead of CastFrom and add [sync] flag right before the list of traits in macros
  • All casts use methods with the same name, cast (that is, cast is an overloaded name)
    • Separate traits are defined for each receiver type requireing casts
  • Casts for Box, Rc, and Arc return Result instead of Option to give the original receiver back on failure
    • This was the original design and returning Option was a bug in API design

Minor polish-ups

Choose a tag to compare

@dynaxis dynaxis released this 17 Apr 07:22
  1. linkme is upgraded to 0.2.1 and intertrait leverages its new shorthand notation for functions in the macro outputs
  2. Documentations are a bit polished up
  3. Upgrade trybuild to 1.0.25