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