Versions in this module Expand all Collapse all v1 v1.0.1 Apr 30, 2024 Changes in this version + func Failf(fmtStr string, v ...any) + func IsZeroValue(val any) bool + func ReadHeader(r io.Reader) (length uint64, object bool, err error) + func Register(t Type) + func Release() + func WriteHeader(w io.Writer, length uint64, object bool) error + type ErrState struct + func (e *ErrState) Error() string + func (e *ErrState) Unwrap() error + type SaverLoader interface + StateLoad func(context.Context, Source) + StateSave func(Sink) + type Sink struct + func (s Sink) Context() context.Context + func (s Sink) Save(slot int, objPtr any) + func (s Sink) SaveValue(slot int, obj any) + type Source struct + func (s Source) AfterLoad(fn func()) + func (s Source) Context() context.Context + func (s Source) Load(slot int, objPtr any) + func (s Source) LoadValue(slot int, objPtr any, fn func(any)) + func (s Source) LoadWait(slot int, objPtr any) + type Stats struct + func Load(ctx context.Context, r io.Reader, rootPtr any) (Stats, error) + func Save(ctx context.Context, w io.Writer, rootPtr any) (Stats, error) + func (s *Stats) String() string + type Type interface + StateFields func() []string + StateTypeName func() string