Versions in this module Expand all Collapse all v0 v0.9.0 Nov 24, 2026 Changes in this version + const GeneratorVersion + const Version + func CheckAt[T any](e *ValidationError, c Codec[T], value T, path ...any) + func Ctor(tag uint16, values ...rt.V) rt.V + func MarshalJSON[T any](c Codec[T], value T, path ...any) ([]byte, error) + func ReadIO(result rt.V) (rt.V, error) + func UnmarshalJSON[T any](c Codec[T], data []byte, path ...any) (T, error) + func Validate[T any](c Codec[T], value T, path ...any) error + func Zero[T any]() (zero T) + type Block struct + func Lean(string, ...BlockOption) Block + func LeanFile(string, ...BlockOption) Block + type BlockOption struct + func Imports(...string) BlockOption + func Models(...any) BlockOption + func Uses(...string) BlockOption + type Codec struct + Check func(*ValidationError, T) + Desc *schema.Desc + FromLean func(rt.V) T + ToLean func(T) rt.V + func Big(kind string, bound string) Codec[*big.Int] + func Bool() Codec[bool] + func Char() Codec[rune] + func Fin(bound string) Codec[uint64] + func Fixed[T fixed](kind string, bits int) Codec[T] + func Option[T any](item Codec[T]) Codec[*T] + func Product[A, B any](a Codec[A], b Codec[B]) Codec[Pair[A, B]] + func Ref[T any](desc func() *schema.Desc, to func(T) rt.V, from func(rt.V) T, ...) Codec[T] + func Result[E, A any](e Codec[E], a Codec[A]) Codec[Except[E, A]] + func Scalar[T any](kind string, bits int, to func(T) rt.V, from func(rt.V) T) Codec[T] + func Sequence[T any](kind string, item Codec[T]) Codec[[]T] + func String() Codec[string] + func Unit() Codec[struct{}] + type Except struct + Error *E + Ok A + type ExceptError struct + Value E + func (e *ExceptError[E]) Error() string + type IOError struct + Message string + func (e *IOError) Error() string + type Issue struct + Message string + Path []any + type Pair struct + Fst A + Snd B + type ValidationError struct + Issues []Issue + func (e *ValidationError) Add(message string, path ...any) + func (e *ValidationError) Err() error + func (e *ValidationError) Error() string + func (e *ValidationError) Prefix(start int, path ...any)