encoding

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: GPL-3.0 Imports: 2 Imported by: 2

Documentation

Overview

Package encoding provides interfaces analogous to the io package, but oriented towards arbitrary type transmission, rather than raw bytes.

The Encoder and Decoder base interfaces use reflect.Value, rather than [any], because the reflect package is pretty much always involved in the marshaling of arbitrary types. It's better to directly impose it as standard, rather than having implementations switch back and forth between reflect and non-reflect code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Closer

type Closer = io.Closer

type Codec

type Codec interface {
	Decoder(io.Reader) (Decoder, error)
	Encoder(io.Writer) (Encoder, error)
}

type Decoder

type Decoder interface {
	Decode(reflect.Type) (reflect.Value, error)
	Closer
}

type Encoder

type Encoder interface {
	Encode(reflect.Value) error
	Closer
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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