serialize

package
v0.0.0-...-133031b Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArborDeserialize

func ArborDeserialize(value reflect.Value, data []byte) (unused []byte, err error)

ArborDeserialize unpacks the given bytes into the given reflect.Value (corresponding to a struct). It returns any bytes that were not needed to deserialize the struct.

func ArborSerialize

func ArborSerialize(value reflect.Value) ([]byte, error)

ArborSerialize serializes the given reflect.Value (corresponding to a struct) into binary with the default configuration.

func ArborSerializeConfig

func ArborSerializeConfig(value reflect.Value, config SerializationConfig) ([]byte, error)

ArborSerializeConfig serializes the given reflect.Value (corresponding to a struct) into binary with the provided configuration.

Types

type ProgressiveBinaryUnmarshaler

type ProgressiveBinaryUnmarshaler interface {
	encoding.BinaryUnmarshaler
	// BytesConsumed can be called after UnmarshalBinary to determine how many bytes of the input to
	// UnmarshalBinary were consumed in the creation of this type.
	BytesConsumed() int
}

ProgressiveBinaryUnmarshaler is a type that fully describes how to unmarshal itself from a stream of bytes.

type SerializationConfig

type SerializationConfig struct {
	SkipSignatures bool
}

SerializationConfig configures how a node is serialized

Jump to

Keyboard shortcuts

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