serializer

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPLDCBOR

type IPLDCBOR[T any] struct {
	Typ  schema.Type
	Opts []bindnode.Option
}

func (*IPLDCBOR[T]) Deserialize

func (i *IPLDCBOR[T]) Deserialize(data []byte) (T, error)

func (*IPLDCBOR[T]) Serialize

func (i *IPLDCBOR[T]) Serialize(val T) ([]byte, error)

type JSON

type JSON[T any] struct{}

func (JSON[T]) Deserialize

func (J JSON[T]) Deserialize(data []byte) (T, error)

func (JSON[T]) Serialize

func (J JSON[T]) Serialize(val T) ([]byte, error)

type Serializer

type Serializer[T any] interface {
	Serialize(val T) ([]byte, error)
	Deserialize(data []byte) (T, error)
}

Jump to

Keyboard shortcuts

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