Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 1.35 KB

README.md

File metadata and controls

28 lines (18 loc) · 1.35 KB

API Overview

Modules

Classes

  • result.DoException: This is used to signal to do() that the result is an Err,
  • result.Err: A value that signifies failure and which stores arbitrary data for the error.
  • result.Ok: A value that indicates success and which stores arbitrary data for the return value.
  • result.UnwrapError: Exception raised from .unwrap_<...> and .expect_<...> calls.

Functions

  • result.as_async_result: Make a decorator to turn an async function into one that returns a Result.
  • result.as_result: Make a decorator to turn a function into one that returns a Result.
  • result.do: Do notation for Result (syntactic sugar for sequence of and_then() calls).
  • result.do_async: Async version of do. Example:
  • result.is_err: A type guard to check if a result is an Err
  • result.is_ok: A type guard to check if a result is an Ok

This file was automatically generated via lazydocs.