Skip to content

Releases: yunjhongwu/strong-type

v0.12.0

17 Jun 20:14
308db09
Compare
Choose a tag to compare
  • Added addable attribute for implementing Add/Sub and relevant traits specifically.
  • Added scalable attribute for implementing operators such as multiplication/division between strongly-typed struct and underlying primitive type.

v0.11.2

14 May 02:13
fd026b3
Compare
Choose a tag to compare
  • Fixed the visibility of is_nan and is_finite for float underlying types.

v0.11.1

09 May 00:17
4e97f5d
Compare
Choose a tag to compare
  • Fixed the visibility of NAN

v0.11.0

14 Apr 16:34
1e990e5
Compare
Choose a tag to compare
  • Enabled pub underlying value access. Users can now strongly type structs, such as struct Timestamp(pub i64), construct them with Timestamp(1234567890), and access the underlying value via timestamp.0.

v0.10.0

06 Mar 02:11
dbdb790
Compare
Choose a tag to compare
  • Adding const_new for creating constant strong-typed values.
  • Adding conversion attribute to optionally implement From/Into underlying types.

v0.9.0

17 Feb 02:03
b726391
Compare
Choose a tag to compare
  • Removing custom_underlying and providing #[strong_type(underlying=i32)] for specifying the underlying primitive type for nested strong-types
  • Adding INFINITY and NEG_INFINITY constants to strong-typed floats.

v0.8.0

05 Feb 02:08
7508a89
Compare
Choose a tag to compare

What's Changed

  • Supporting nested strong types , i.e. the underlying type can be a strong-typed primitive once custom_underlying is provided.

v0.7.0

17 Jan 03:16
72e6c45
Compare
Choose a tag to compare
  • Implementing Sum and Product

v0.6.0

03 Jan 01:22
6f34807
Compare
Choose a tag to compare
  • MIN, MAX, ZERO, and NAN are added as associated constants of strong types where applicable.
  • Minor bug fixes.

v0.5.0

27 Dec 01:16
Compare
Choose a tag to compare
  • All optional changes are specified as #[string_type(auto_operators, custom_display)].
  • auto_operators implements bit operations for strongly-typed integers.
  • The constructor is updated to accept types that implement Into, now defined as ::new(value: impl Into<UnderlyingType>).