convert

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalConvertible

func MarshalConvertible(c Convertible) (data []byte, err error)

MarshalConvertible marshals a Convertible object to binary data.

Types

type Convertible

type Convertible interface {
	ToProtoMessage() (proto.Message, error)
	FromProtoMessage(proto.Message) error
}

Convertible is the interface implemented by an object that can conver to/from proto message representation of itself.

type Serializable

type Serializable interface {
	Marshal() (data []byte, err error)
	Unmarshal(data []byte) error
}

Serializable is the interface implemented by an object that can marshal/unmarshal a binary representation of itself.

Jump to

Keyboard shortcuts

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