Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Uint32OrHash ¶
type Uint32OrHash struct {
// contains filtered or unexported fields
}
Uint32OrHash represents a variadic type that is either uint32 or common.Hash.
func MustNewUint32OrHash ¶
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 ¶
func NewUint32OrHash(value interface{}) (*Uint32OrHash, error)
NewUint32OrHash returns a new variadic.Uint32OrHash given an int, uint32, or Hash
func NewUint32OrHashFromBytes ¶
func NewUint32OrHashFromBytes(data []byte) *Uint32OrHash
NewUint32OrHashFromBytes returns a new variadic.Uint32OrHash from an encoded variadic uint32 or hash
func (*Uint32OrHash) Decode ¶
func (x *Uint32OrHash) Decode(r io.Reader) error
Decode decodes a value into a Uint32OrHash
func (*Uint32OrHash) Encode ¶
func (x *Uint32OrHash) Encode() ([]byte, error)
Encode will encode a Uint32OrHash using SCALE
func (*Uint32OrHash) Hash ¶
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 ¶
func (x *Uint32OrHash) IsHash() bool
IsHash returns true if the value is a hash
func (*Uint32OrHash) IsUint32 ¶
func (x *Uint32OrHash) IsUint32() bool
IsUint32 returns true if the value is a uint32
func (*Uint32OrHash) Uint32 ¶
func (x *Uint32OrHash) Uint32() uint32
Uint32 returns the value as a uint32. It panics if the value is not a uint32.
func (*Uint32OrHash) Value ¶
func (x *Uint32OrHash) Value() interface{}
Value returns the interface value.