GitHub

CatchDecoding

API reference for CatchDecoding.

catch_decoding(f): apply with .pipe.

Functions

__init__

__init__(f) -> None
ParameterTypeDescription
fCallable[[Issue], Parse[A, R_co]]
def __init__(self, f: Callable[[Issue], Parse[A, R_co]]) -> None:
    self._f = f

__call__

__call__[E, RD = Never, RE = Never](schema) -> Bottom[A, E, RD | R_co, RE]
ParameterTypeDescription
schemaCodec[A, E, RD, RE]

Returns Bottom[A, E, RD | R_co, RE]

def __call__[E, RD = Never, RE = Never](
    self, schema: Codec[A, E, RD, RE], /
) -> Bottom[A, E, RD | R_co, RE]:
    middleware: MiddlewareDecoding[A, RD, RD | R_co] = MiddlewareDecoding(_catching(self._f))
    return middleware(schema)