serializers

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 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 MemorySerializer

type MemorySerializer[V any] struct {
	Size int
	Str  bool
}

func NewMemorySerializer

func NewMemorySerializer[V any]() *MemorySerializer[V]

func (*MemorySerializer[V]) Marshal

func (s *MemorySerializer[V]) Marshal(v V) ([]byte, error)

func (*MemorySerializer[V]) Unmarshal

func (s *MemorySerializer[V]) Unmarshal(raw []byte, v *V) error

type Serializer

type Serializer[T any] interface {
	Marshal(v T) ([]byte, error)
	Unmarshal(raw []byte, v *T) error
}

Jump to

Keyboard shortcuts

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