variadic

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Uint32OrHash added in v0.7.0

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

Uint32OrHash represents a variadic type that is either uint32 or common.Hash.

func MustNewUint32OrHash added in v0.7.0

func MustNewUint32OrHash(value interface{}) *Uint32OrHash

MustNewUint32OrHash returns a new variadic.Uint32OrHash given an int, uint32, or Hash It panics if the input value is invalid

func NewUint32OrHash added in v0.7.0

func NewUint32OrHash(value interface{}) (*Uint32OrHash, error)

NewUint32OrHash returns a new variadic.Uint32OrHash given an int, uint32, or Hash

func NewUint32OrHashFromBytes added in v0.7.0

func NewUint32OrHashFromBytes(data []byte) *Uint32OrHash

NewUint32OrHashFromBytes returns a new variadic.Uint32OrHash from an encoded variadic uint32 or hash

func (*Uint32OrHash) Decode added in v0.7.0

func (x *Uint32OrHash) Decode(r io.Reader) error

Decode decodes a value into a Uint32OrHash

func (*Uint32OrHash) Encode added in v0.7.0

func (x *Uint32OrHash) Encode() ([]byte, error)

Encode will encode a Uint32OrHash using SCALE

func (*Uint32OrHash) Hash added in v0.7.0

func (x *Uint32OrHash) Hash() common.Hash

Hash returns the value as a common.Hash. It panics if the value is not a hash.

func (*Uint32OrHash) IsHash added in v0.7.0

func (x *Uint32OrHash) IsHash() bool

IsHash returns true if the value is a hash

func (*Uint32OrHash) IsUint32 added in v0.7.0

func (x *Uint32OrHash) IsUint32() bool

IsUint32 returns true if the value is a uint32

func (*Uint32OrHash) Uint32 added in v0.7.0

func (x *Uint32OrHash) Uint32() uint32

Uint32 returns the value as a uint32. It panics if the value is not a uint32.

func (*Uint32OrHash) Value added in v0.7.0

func (x *Uint32OrHash) Value() interface{}

Value returns the interface value.

Jump to

Keyboard shortcuts

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