9 lines
149 B
Go
9 lines
149 B
Go
package codec
|
|
|
|
type Conversion[T, U any] = func(T) (U, error)
|
|
|
|
type Codec[T any] interface {
|
|
Encode(T) (string, error)
|
|
Decode(string) (T, error)
|
|
}
|