codec

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 1 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 {
	Marshal(T) ([]byte, error)
	Unmarshal([]byte, *T) error
}

type JsonCodec

type JsonCodec[T any] struct{}

func (*JsonCodec[T]) Marshal

func (c *JsonCodec[T]) Marshal(v T) ([]byte, error)

func (*JsonCodec[T]) Unmarshal

func (c *JsonCodec[T]) Unmarshal(data []byte, v *T) error

Jump to

Keyboard shortcuts

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