Skip to content

rustlike-result v0.4.4 (2024-06-08)

Pre-release
Pre-release
Compare
Choose a tag to compare
@yifanwww yifanwww released this 08 Jun 08:13
· 23 commits to main since this release

Features

Add asynchronous Result ResultAsync, support these methods:

  • ResultAsync.isOk
  • ResultAsync.isOkAnd
  • ResultAsync.isErr
  • ResultAsync.isErrAnd
  • ResultAsync.ok
  • ResultAsync.err
  • ResultAsync.map
  • ResultAsync.mapOr
  • ResultAsync.mapOrElse
  • ResultAsync.mapErr
  • ResultAsync.inspect
  • ResultAsync.inspectErr
  • ResultAsync.expect
  • ResultAsync.unwrap
  • ResultAsync.expectErr
  • ResultAsync.unwrapErr
  • ResultAsync.unwrapOr
  • ResultAsync.unwrapOrElse
  • ResultAsync.unwrapUnchecked
  • ResultAsync.unwrapErrUnchecked
  • ResultAsync.and
  • ResultAsync.andThen
  • ResultAsync.or
  • ResultAsync.orElse
  • ResultAsync.transpose
  • ResultAsync.equal

Add new factories:

  • OkAsync
  • ErrAsync

Support new methods for Result:

  • Result.async

Add new resultifying helpers:

  • resultifyAsync
  • resultifySync
  • resultifyPromise

Notable Changes

These methods are deprecated:

  • Result.isOkAndAsync
  • Result.isErrAndAsync
  • Result.mapAsync
  • Result.mapOrAsync
  • Result.mapOrElseAsync
  • Result.mapErrAsync
  • Result.inspectAsync
  • Result.inspectErrAsync
  • Result.unwrapOrElseAsync
  • Result.andThenAsync
  • Result.orElseAsync

These helpers are deprecated:

  • resultify
  • resultify.sync
  • resultify.promise