Skip to content

Err

Bases: ResultType[T, E]


              flowchart TD
              pyochain.core._result.Err[Err]
              pyochain.core._result.ResultType[ResultType]
              pyochain.abc._mixins.Pipe[Pipe]

                              pyochain.core._result.ResultType --> pyochain.core._result.Err
                                pyochain.abc._mixins.Pipe --> pyochain.core._result.ResultType
                



              click pyochain.core._result.Err href "" "pyochain.core._result.Err"
              click pyochain.core._result.ResultType href "" "pyochain.core._result.ResultType"
              click pyochain.abc._mixins.Pipe href "" "pyochain.abc._mixins.Pipe"
            

Represents an error value.

One of the two variants of Result[T, E], where E is the type of the value in Err.

For more documentation, see the ResultType[T, E] Protocol.

Source code in pyochain/core/_result.pyi
974
975
976
977
978
979
980
981
982
983
984
985
986
987
@final
class Err[T = Any, E = Any](ResultType[T, E]):
    """Represents an error value.

    One of the two variants of `Result[T, E]`, where `E` is the type of the value in `Err`.

    For more documentation, see the `ResultType[T, E]` Protocol.
    """

    error: Final[E]
    """Final[E]: The contained error value."""
    __match_args__ = ("error",)
    # NOTE: same hack as in `Ok` for type errors
    def __new__(cls, error: E) -> Result[T, E]: ...

error instance-attribute

Final[E]: The contained error value.