types

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidResult = errors.New("decoding failed, invalid Result")

ErrInvalidResult is returned when decoding a Result type fails

Functions

This section is empty.

Types

type Result

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

Result represents a Result type.

func NewResult

func NewResult(isErr byte, data []byte) *Result

NewResult returns a new Result type

func (*Result) Decode

func (r *Result) Decode(reader io.Reader) (*Result, error)

Decode return a Result from scale encoded data

func (*Result) Encode

func (r *Result) Encode() ([]byte, error)

Encode returns the SCALE encoded Result

func (*Result) Value

func (r *Result) Value() []byte

Value returns the []byte data. It returns nil if isErr is true.

Jump to

Keyboard shortcuts

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