discordetf

package
v0.0.0-...-b260e94 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Erlang distribution header
	EtDist = byte('D')
)
View Source
const (
	// Erlang external term format version
	EtVersion = byte(131)
)

Variables

View Source
var Encoding discord.Encoding = decoder{}
View Source
var (
	ErrFloatScan = fmt.Errorf("read: sscanf float")
)
View Source
var (
	MapType = reflect.TypeOf(Map{})
)

Functions

func NewInvalidTypesError

func NewInvalidTypesError(t reflect.Type, term Term) error

func StringTerm

func StringTerm(t Term) (s string, ok bool)

func TermIntoStruct

func TermIntoStruct(term Term, dest interface{}) error

Types

type Atom

type Atom string

type Context

type Context struct {
	ConvertBinaryToString bool
	ConvertAtomsToBinary  bool
	// contains filtered or unexported fields
}

func (*Context) NewGenDecoder

func (c *Context) NewGenDecoder(r io.Reader) *genDecoder

func (*Context) Read

func (c *Context) Read(r io.Reader) (term Term, err error)

func (*Context) ReadDist

func (c *Context) ReadDist(r io.Reader) (err error)

func (*Context) Write

func (c *Context) Write(w io.Writer, term interface{}) (err error)

func (*Context) WriteDist

func (c *Context) WriteDist(w io.Writer, _ []Term) (err error)

type ErrUnknownTerm

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

func (*ErrUnknownTerm) Error

func (e *ErrUnknownTerm) Error() string

type ErrUnknownType

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

func (*ErrUnknownType) Error

func (e *ErrUnknownType) Error() string

type Export

type Export struct {
	Module   Atom
	Function Atom
	Arity    byte
}

type Function

type Function struct {
	Arity     byte
	Unique    [16]byte
	Index     uint32
	Free      uint32
	Module    Atom
	OldIndex  uint32
	OldUnique uint32
	Pid       Pid
	FreeVars  []Term
}

type InvalidStructKeyError

type InvalidStructKeyError struct {
	Term Term
	errors.StackTrace
}

func (*InvalidStructKeyError) Error

func (s *InvalidStructKeyError) Error() string

type List

type List []Term

type Map

type Map map[Term]Term

func (Map) MarshalJSON

func (m Map) MarshalJSON() ([]byte, error)

type Pid

type Pid struct {
	Node     Atom
	Id       uint32
	Serial   uint32
	Creation byte
}

type Port

type Port struct {
	Node     Atom
	Id       uint32
	Creation byte
}

type Ref

type Ref struct {
	Node     Atom
	Creation byte
	Id       []uint32
}

type StructPopulatorError

type StructPopulatorError struct {
	Type reflect.Type
	Term Term
}

func (*StructPopulatorError) Error

func (s *StructPopulatorError) Error() string

type Term

type Term interface{}

type Tuple

type Tuple []Term

func (Tuple) Element

func (t Tuple) Element(i int) Term

Jump to

Keyboard shortcuts

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