codec

package
v0.0.0-...-50414e9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec[T any] interface {
	Encoder[T]
	Decoder[T]
}

Codec is an interface for encoding and decoding values.

func CodecFor

func CodecFor[T any]() Codec[T]

CodecFor returns the codec for the given type.

type Decoder

type Decoder[T any] interface {
	Decode(bz []byte) (T, error)
}

Decoder is an interface for decoding values.

type Encoder

type Encoder[T any] interface {
	Encode(v T) ([]byte, error)
}

Encoder is an interface for encoding values.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL