Releases: botahamec/exun
Releases · botahamec/exun
v0.2.0
Big update! 🎉
- Exun is now using the Zero-Clause BSD License instead of Unlicense
RawUnexpected
andUnexpectedError
now haveNone
variants. These aren't string messages, or boxed errors. They're just empty. That means thatOption
s can now be converted into these errors. And since this doesn't requirealloc
, most features of exun can now be used with justcore
.- A new
ResultExunExt
trait has been created, which extendsResult<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 implementsexpect
,unwrap_or
andunwrap_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
This is the first release of exun!
-
This crate works in
no-std
, although most features (besidesExun
) requirealloc
. -
Exun
is an error type. It'll hold on to yourUnexpected
error if you have one, so you can figure out what to do with it later. If the error isExpected
, then it'll hold onto that too. -
RawUnexpected
bottles up all of your unexpected errors. There's alsoUnexpectedError
, which implementsError
. -
Expect
is a type alias forExun<E, RawUnexpected>
. -
Clearly mark errors that you don't expect to occur by calling
Result::unexpect
. If the error type doesn't implementError
, you can still useResult::unexpect_msg
, as long as it implementsDebug + Display + Send + Sync + 'static
.