GitHub

LinkTransformation

API reference for LinkTransformation.

What a link applies: a transformation.Transformation (a getter each way) or a transformation.Middleware (a function of the whole parse each way).

Attributes

AttributeTypeDescription
sees_failuresbool

Its decoding runs on failures too (a middleware that may recover), so a union cannot pick its member by the source's kind or literals.

Functions

flip

flip() -> LinkTransformation

Returns LinkTransformation

def flip(self) -> LinkTransformation: ...

decode_result

decode_result(result, options) -> ParseResult

The decoded side of result, the parse of the source.

ParameterTypeDescription
resultParseResult
optionsParseOptions

Returns ParseResult

def decode_result(self, result: ParseResult, options: ParseOptions) -> ParseResult:
    """The decoded side of ``result``, the parse of the source."""
    ...