types

package
v0.0.0-...-73fe2af Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address [20]uint8

func AddressFromBytes

func AddressFromBytes(b []byte) Address

func (Address) String

func (a Address) String() string

func (Address) ToSlice

func (a Address) ToSlice() []byte

type Hash

type Hash [32]uint8

func HashFromBytes

func HashFromBytes(b []byte) Hash

func (Hash) IsZero

func (h Hash) IsZero() bool

func (Hash) String

func (h Hash) String() string

func (Hash) ToSlice

func (h Hash) ToSlice() []byte

type List

type List[T any] struct {
	Data []T
}

func NewList

func NewList[T any]() *List[T]

func (*List[T]) Clear

func (l *List[T]) Clear()

func (*List[T]) Contains

func (l *List[T]) Contains(v T) bool

func (*List[T]) Get

func (l *List[T]) Get(index int) T

func (*List[T]) GetIndex

func (l *List[T]) GetIndex(v T) int

GetIndex will return the index of v. If v does not exist in the list -1 will be returned.

func (*List[T]) Insert

func (l *List[T]) Insert(v T)

func (List[T]) Last

func (l List[T]) Last() T

func (*List[T]) Len

func (l *List[T]) Len() int

func (*List[T]) Pop

func (l *List[T]) Pop(index int)

func (*List[T]) Remove

func (l *List[T]) Remove(v T)

Jump to

Keyboard shortcuts

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