Skip to content

Releases: botahamec/exun

v0.2.0

12 Aug 21:39
Compare
Choose a tag to compare

Big update! 🎉

  • Exun is now using the Zero-Clause BSD License instead of Unlicense
  • RawUnexpected and UnexpectedError now have None variants. These aren't string messages, or boxed errors. They're just empty. That means that Options can now be converted into these errors. And since this doesn't require alloc, most features of exun can now be used with just core.
  • A new ResultExunExt trait has been created, which extends Result<T, Exun<E, U>>. So it now implements several new methods which should make it more ergonomic
  • Many embarassing problems in the docs are now fixed
  • Tests no longer fail in no-std
  • Exun now implements expect, unwrap_or and unwrap_or_else
  • Some methods are now must_use

Added methods:

  • Result<T, RawUnexpected>::unexpect
  • Result<T, E>::unexpect_none
  • Option<T>::unexpect_none
  • RawUnexpected::none
  • UnexpectedError::none
  • Exun::expect
  • Result<T, Exun<E, U>>::expected_err
  • Result<T, Exun<E, U>>::unexpected_err
  • Result<T, Exun<E, U>>::map_expected_err
  • Result<T, Exun<E, U>>::map_unexpected_err
  • Result<T, Exun<E, U>>::unwrap_result
  • Result<T, Exun<E, U>>::unwrap_expected_err
  • Result<T, Exun<E, U>>::unwrap_unexpected_err
  • Exun::unwrap_or
  • Exun::unwrap_or_else

v0.1.0

23 Oct 20:24
Compare
Choose a tag to compare
v0.1.0 Pre-release
Pre-release

This is the first release of exun!

  • This crate works in no-std, although most features (besides Exun) require alloc.

  • Exun is an error type. It'll hold on to your Unexpected error if you have one, so you can figure out what to do with it later. If the error is Expected, then it'll hold onto that too.

  • RawUnexpected bottles up all of your unexpected errors. There's also UnexpectedError, which implements Error.

  • Expect is a type alias for Exun<E, RawUnexpected>.

  • Clearly mark errors that you don't expect to occur by calling Result::unexpect. If the error type doesn't implement Error, you can still use Result::unexpect_msg, as long as it implements Debug + Display + Send + Sync + 'static.