github hashintel/hash error-stack@0.6.0

3 days ago

crates.io libs.rs rust-version documentation license

What changed

Features

  • Report has been split into Report<C> and Report<[C]> to distinguish between a group of related errors and a single error. These errors can still be nested. (#5047)
  • Introduce a new unstable flag, which is used to enable unstable features, these features are not covered by semver and may be modified or removed at any time. (#5181)
  • Reintroduce a new IntoReport trait, which is used to determine when a type can be converted to a Report. This allows the usage of errors more idiomatically in traits, such as type Error: IntoReport. (#6738)

Breaking Changes

  • Rename attach[_lazy] to attach_opaque[_with] and attach_printable[_lazy] to attach[_with]. (#7753)
  • Set the MSRV to 1.83 (#5333)
  • Extend is no longer implemented by Report<C>, instead it is implemented on Report<[C]>, either use From or Report::expand to convert between Report<C> into Report<[C]>. (#5047)
  • extend_one has been renamed to push and is only implemented on Report<[C]>. (#5047)
  • bail!(report,) has been removed, one must now use bail!(report). This is in preparation for the unstable bail! macro that allows to construct Report<[C]>. (#5047)

Deprecations

  • Context: Use core::error::Error instead (#5533)
  • Result<T, C>: Use core::result::Result<T, Report<C>> instead (#5533)
  • report!, use IntoReport::into_report instead. (#6738)

Full Changelog: https://github.com/hashintel/hash/compare/error-stack@0.5.0...error-stack@0.6.0

Don't miss a new hash release

NewReleases is sending notifications on new releases.