diff --git a/exceptions.html b/exceptions.html index 17f485e..1c389b4 100644 --- a/exceptions.html +++ b/exceptions.html @@ -2,18 +2,21 @@ - - + + rusty_results.exceptions API documentation - - - - - - + + + + + + - - + +
@@ -22,36 +25,6 @@

Module rusty_results.exceptions

-
- -Expand source code - -
from functools import wraps
-from typing import TypeVar
-
-
-class UnwrapException(Exception):
-    ...
-
-
-T = TypeVar("T")
-
-
-class EarlyReturnException(ValueError):
-    def __init__(self, value: T):
-        self.value = value
-        super().__init__(self.value)
-
-
-def early_return(f):
-    @wraps(f)
-    def wrapper(*args, **kwargs):
-        try:
-            f(*args, **kwargs)
-        except EarlyReturnException as e:
-            return e.value
-    return wrapper
-
@@ -65,19 +38,6 @@

Functions

-
- -Expand source code - -
def early_return(f):
-    @wraps(f)
-    def wrapper(*args, **kwargs):
-        try:
-            f(*args, **kwargs)
-        except EarlyReturnException as e:
-            return e.value
-    return wrapper
-
@@ -129,7 +89,6 @@

Ancestors