package codec type Codec[T, U any] interface { Encode(T) (U, error) Decode(U) (T, error) } type Marshaler[T any] = Codec[T, string]