GitHub

CatchEncoding

API reference for CatchEncoding.

catch_encoding(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__[T, RD = Never, RE = Never](schema) -> Bottom[T, A, RD, RE | R_co]
ParameterTypeDescription
schemaCodec[T, A, RD, RE]

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

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