class documentation

class Functions(Projection):

View In Hierarchy

The escape hatch: a Projection written as the functions themselves.

For a type that fits no recipe. It is still keyed by type name and registered explicitly, and it inverts only if given encode.

Method decode Return what the supplied decode function makes of one payload.
Method shape Return what the supplied shape function makes of this type.
Instance Variable decoded_by What one payload writes.
Instance Variable encode How a written value becomes a payload again, or None for a rendering that cannot be published through.
Instance Variable shaped_by What this type becomes at init.
Property inverse Return the inverse this entry was given.
def decode(self, message: Message, context: ProjectionContext) -> Mapping[str, object]:

Return what the supplied decode function makes of one payload.

def shape(self, message_type: type[Message], context: ProjectionContext) -> tuple[PlanEntry, ...]:

Return what the supplied shape function makes of this type.

decoded_by: DecodeFunction =

What one payload writes.

encode: EncodeFunction | None =

How a written value becomes a payload again, or None for a rendering that cannot be published through.

shaped_by: ShapeFunction =

What this type becomes at init.

@property
inverse: EncodeFunction | None =

Return the inverse this entry was given.