Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockHashOrNumber ¶
type BlockHashOrNumber struct {
// contains filtered or unexported fields
}
func BlockHashOrNumberWithHash ¶
func BlockHashOrNumberWithHash(hash common.Hash) BlockHashOrNumber
func BlockHashOrNumberWithHex ¶
func BlockHashOrNumberWithHex(hex string) BlockHashOrNumber
func BlockHashOrNumberWithNumber ¶
func BlockHashOrNumberWithNumber(blockNumber uint64) BlockHashOrNumber
func (BlockHashOrNumber) HashOrNumber ¶
func (bhon BlockHashOrNumber) HashOrNumber() (common.Hash, bool, uint64)
func (BlockHashOrNumber) MarshalJSON ¶
func (bhon BlockHashOrNumber) MarshalJSON() ([]byte, error)
func (*BlockHashOrNumber) UnmarshalJSON ¶
func (bhon *BlockHashOrNumber) UnmarshalJSON(data []byte) error
type Lazy ¶
type Lazy[T any] struct { // contains filtered or unexported fields }
Lazy wraps encoded data and decode on demand for CPU saving.
func NewLazyWithJson ¶
func (*Lazy[T]) IsEmptyOrNull ¶
IsEmptyOrNull indicates if the encoded data is empty or null value for pointer, map or slice type.
This is helpful to check if the wrapped object is nil without json unmarshal for CPU saving.
func (Lazy[T]) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Lazy[T]) MustLoad ¶
func (lazy *Lazy[T]) MustLoad() T
MustLoad should always return the decoded data without any decode error.
func (*Lazy[T]) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.