serializer

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: 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 NonFallableSerializer

type NonFallableSerializer struct {
	// contains filtered or unexported fields
}

func NewNonFallable

func NewNonFallable(w io.Writer) *NonFallableSerializer

func (*NonFallableSerializer) Bool

func (a *NonFallableSerializer) Bool(b bool)

func (*NonFallableSerializer) Byte

func (a *NonFallableSerializer) Byte(b byte)

func (*NonFallableSerializer) Bytes

func (a *NonFallableSerializer) Bytes(b []byte)

func (*NonFallableSerializer) Int64

func (a *NonFallableSerializer) Int64(v int64)

func (*NonFallableSerializer) N

func (*NonFallableSerializer) String

func (a *NonFallableSerializer) String(s string)

func (*NonFallableSerializer) StringWithUInt16Len

func (a *NonFallableSerializer) StringWithUInt16Len(s string) error

func (*NonFallableSerializer) Uint16

func (a *NonFallableSerializer) Uint16(v uint16)

func (*NonFallableSerializer) Uint32

func (a *NonFallableSerializer) Uint32(v uint32)

func (*NonFallableSerializer) Uint64

func (a *NonFallableSerializer) Uint64(v uint64)

func (*NonFallableSerializer) Write

func (a *NonFallableSerializer) Write(b []byte) (int, error)

type Serializer

type Serializer struct {
	// contains filtered or unexported fields
}

func New

func New(w io.Writer) *Serializer

func (*Serializer) Bool

func (a *Serializer) Bool(b bool) error

func (*Serializer) Byte

func (a *Serializer) Byte(b byte) error

func (*Serializer) Bytes

func (a *Serializer) Bytes(b []byte) error

func (*Serializer) BytesWithUInt16Len added in v0.5.0

func (a *Serializer) BytesWithUInt16Len(data []byte) error

func (*Serializer) BytesWithUInt32Len

func (a *Serializer) BytesWithUInt32Len(data []byte) error

func (*Serializer) N

func (a *Serializer) N() int64

func (*Serializer) String

func (a *Serializer) String(s string) error

func (*Serializer) StringWithUInt16Len

func (a *Serializer) StringWithUInt16Len(s string) error

func (*Serializer) StringWithUInt32Len

func (a *Serializer) StringWithUInt32Len(s string) error

StringWithUInt32Len writes to the buffer `buf` four bytes of the string's `s` length followed with the bytes of string itself.

func (*Serializer) Uint16

func (a *Serializer) Uint16(v uint16) error

func (*Serializer) Uint32

func (a *Serializer) Uint32(v uint32) error

func (*Serializer) Uint64

func (a *Serializer) Uint64(v uint64) error

func (*Serializer) Write

func (a *Serializer) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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