serializer

package
v0.0.0-...-e229e0e Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalSerializer = Serializer{
	OnError: func(err error) {
		fmt.Println("serializer error: ", err)
	},
}

Functions

func BoolBytes

func BoolBytes(w io.Writer, b bool)

func BoolFromBytes

func BoolFromBytes(r io.Reader) bool

func Float32bytes

func Float32bytes(w io.Writer, float float32)

func Float32frombytes

func Float32frombytes(r io.Reader) float32

func Float64bytes

func Float64bytes(w io.Writer, float float64)

func Float64frombytes

func Float64frombytes(r io.Reader) float64

func SerializeArgs

func SerializeArgs(args ...interface{}) []byte

func Stringbytes

func Stringbytes(w io.Writer, str string)

func Stringfrombytes

func Stringfrombytes(r io.Reader) string

func UInt16Bytes

func UInt16Bytes(w io.Writer, i uint16)

func UInt16frombytes

func UInt16frombytes(r io.Reader) uint16

func UInt32Bytes

func UInt32Bytes(w io.Writer, i uint32)

func UInt32frombytes

func UInt32frombytes(r io.Reader) uint32

func UInt64Bytes

func UInt64Bytes(w io.Writer, i uint64)

func UInt64frombytes

func UInt64frombytes(r io.Reader) uint64

func UInt8Bytes

func UInt8Bytes(w io.Writer, i uint8)

func UInt8frombytes

func UInt8frombytes(r io.Reader) uint8

func Vector2bytes

func Vector2bytes(w io.Writer, vector mgl32.Vec2)

func Vector2bytes64

func Vector2bytes64(w io.Writer, vector mgl64.Vec2)

func Vector2frombytes

func Vector2frombytes(r io.Reader) mgl32.Vec2

func Vector2frombytes64

func Vector2frombytes64(r io.Reader) mgl64.Vec2

func Vector3bytes

func Vector3bytes(w io.Writer, vector mgl32.Vec3)

func Vector3bytes64

func Vector3bytes64(w io.Writer, vector mgl64.Vec3)

func Vector3frombytes

func Vector3frombytes(r io.Reader) mgl32.Vec3

func Vector3frombytes64

func Vector3frombytes64(r io.Reader) mgl64.Vec3

Types

type Serializer

type Serializer struct {
	OnError func(error)
}

func (Serializer) BoolBytes

func (s Serializer) BoolBytes(w io.Writer, b bool)

func (Serializer) BoolFromBytes

func (s Serializer) BoolFromBytes(r io.Reader) bool

func (Serializer) Float32bytes

func (s Serializer) Float32bytes(w io.Writer, float float32)

func (Serializer) Float32frombytes

func (s Serializer) Float32frombytes(r io.Reader) float32

func (Serializer) Float64bytes

func (s Serializer) Float64bytes(w io.Writer, float float64)

func (Serializer) Float64frombytes

func (s Serializer) Float64frombytes(r io.Reader) float64

func (Serializer) SerializeArgs

func (s Serializer) SerializeArgs(args ...interface{}) []byte

func (Serializer) Stringbytes

func (s Serializer) Stringbytes(w io.Writer, str string)

func (Serializer) Stringfrombytes

func (s Serializer) Stringfrombytes(r io.Reader) string

func (Serializer) UInt16Bytes

func (s Serializer) UInt16Bytes(w io.Writer, i uint16)

func (Serializer) UInt16frombytes

func (s Serializer) UInt16frombytes(r io.Reader) uint16

func (Serializer) UInt32Bytes

func (s Serializer) UInt32Bytes(w io.Writer, i uint32)

func (Serializer) UInt32frombytes

func (s Serializer) UInt32frombytes(r io.Reader) uint32

func (Serializer) UInt64Bytes

func (s Serializer) UInt64Bytes(w io.Writer, i uint64)

func (Serializer) UInt64frombytes

func (s Serializer) UInt64frombytes(r io.Reader) uint64

func (Serializer) UInt8Bytes

func (s Serializer) UInt8Bytes(w io.Writer, i uint8)

func (Serializer) UInt8frombytes

func (s Serializer) UInt8frombytes(r io.Reader) uint8

func (Serializer) Vector2bytes

func (s Serializer) Vector2bytes(w io.Writer, vector mgl32.Vec2)

func (Serializer) Vector2bytes64

func (s Serializer) Vector2bytes64(w io.Writer, vector mgl64.Vec2)

func (Serializer) Vector2frombytes

func (s Serializer) Vector2frombytes(r io.Reader) mgl32.Vec2

func (Serializer) Vector2frombytes64

func (s Serializer) Vector2frombytes64(r io.Reader) mgl64.Vec2

func (Serializer) Vector3bytes

func (s Serializer) Vector3bytes(w io.Writer, vector mgl32.Vec3)

func (Serializer) Vector3bytes64

func (s Serializer) Vector3bytes64(w io.Writer, vector mgl64.Vec3)

func (Serializer) Vector3frombytes

func (s Serializer) Vector3frombytes(r io.Reader) mgl32.Vec3

func (Serializer) Vector3frombytes64

func (s Serializer) Vector3frombytes64(r io.Reader) mgl64.Vec3

Jump to

Keyboard shortcuts

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