Field definitions shared by every variant (Effect's
VariantSchema.Struct); a toolkit's extract gives one variant's
struct schema.
Functions#
__init__#
__init__(fields) -> None| Parameter | Type | Description |
|---|---|---|
fields | Mapping[str, Definition | None] |
def __init__(self, fields: Mapping[str, Definition | None]) -> None:
self._fields = {name: value for name, value in fields.items() if value is not None}
self._caches: tuple[dict[str, Any], dict[str, Any]] = ({}, {})pipe#
pipe[B](f) -> B| Parameter | Type | Description |
|---|---|---|
f | Callable[[Struct], B] |
Returns B
def pipe[B](self, f: Callable[[Struct], B], /) -> B:
return f(self)