Documentation ¶
Index ¶
- Constants
- Variables
- func AsBytes16(v View, err error) ([16]byte, error)
- func AsBytes4(v View, err error) ([4]byte, error)
- func AsBytes8(v View, err error) ([8]byte, error)
- func AsRoot(v View, err error) (Root, error)
- func ByteBitIndex(v byte) (out uint64)
- func BytesIntoNodes(contents []byte) ([]Node, error)
- func SubtreeIntoBytes(anchor Node, depth uint8, length uint64, dest []byte) error
- type BackedView
- type BackingHook
- type BasicListTypeDef
- func (td *BasicListTypeDef) BottomNodeLimit() uint64
- func (td *BasicListTypeDef) Default(hook BackingHook) View
- func (td *BasicListTypeDef) DefaultNode() Node
- func (td *BasicListTypeDef) Deserialize(dr *codec.DecodingReader) (View, error)
- func (td *BasicListTypeDef) ElementType() TypeDef
- func (td *BasicListTypeDef) ElementsPerBottomNode() uint64
- func (td *BasicListTypeDef) FromElements(v ...BasicView) (*BasicListView, error)
- func (td *BasicListTypeDef) Limit() uint64
- func (td *BasicListTypeDef) New() *BasicListView
- func (td *BasicListTypeDef) String() string
- func (td *BasicListTypeDef) TranslateIndex(index uint64) (nodeIndex uint64, intraNodeIndex uint8)
- func (td *BasicListTypeDef) ViewFromBacking(node Node, hook BackingHook) (View, error)
- type BasicListView
- func (tv *BasicListView) Append(view BasicView) error
- func (tv *BasicListView) CheckIndex(i uint64) error
- func (tv *BasicListView) Copy() (View, error)
- func (tv *BasicListView) Get(i uint64) (BasicView, error)
- func (tv *BasicListView) Iter() ElemIter
- func (tv *BasicListView) Length() (uint64, error)
- func (tv *BasicListView) Pop() error
- func (tv *BasicListView) ReadonlyIter() ElemIter
- func (tv *BasicListView) Serialize(w *codec.EncodingWriter) error
- func (tv *BasicListView) Set(i uint64, v BasicView) error
- func (tv *BasicListView) ValueByteLength() (uint64, error)
- func (tv *BasicListView) ViewRoot(h HashFn) Root
- type BasicTypeDef
- type BasicVectorTypeDef
- func (td *BasicVectorTypeDef) BottomNodeLength() uint64
- func (td *BasicVectorTypeDef) Default(hook BackingHook) View
- func (td *BasicVectorTypeDef) DefaultNode() Node
- func (td *BasicVectorTypeDef) Deserialize(dr *codec.DecodingReader) (View, error)
- func (td *BasicVectorTypeDef) ElementType() TypeDef
- func (td *BasicVectorTypeDef) ElementsPerBottomNode() uint64
- func (td *BasicVectorTypeDef) FromElements(v ...BasicView) (*BasicVectorView, error)
- func (td *BasicVectorTypeDef) Length() uint64
- func (td *BasicVectorTypeDef) New() *BasicVectorView
- func (td *BasicVectorTypeDef) String() string
- func (td *BasicVectorTypeDef) TranslateIndex(index uint64) (nodeIndex uint64, intraNodeIndex uint8)
- func (td *BasicVectorTypeDef) ViewFromBacking(node Node, hook BackingHook) (View, error)
- type BasicVectorView
- func (tv *BasicVectorView) Copy() (View, error)
- func (tv *BasicVectorView) Get(i uint64) (BasicView, error)
- func (tv *BasicVectorView) Iter() ElemIter
- func (tv *BasicVectorView) ReadonlyIter() ElemIter
- func (tv *BasicVectorView) Serialize(w *codec.EncodingWriter) error
- func (tv *BasicVectorView) Set(i uint64, v BasicView) error
- func (tv *BasicVectorView) ValueByteLength() (uint64, error)
- type BasicView
- type BitIter
- type BitIterFn
- type BitListTypeDef
- func (td *BitListTypeDef) BottomNodeLimit() uint64
- func (td *BitListTypeDef) Default(hook BackingHook) View
- func (td *BitListTypeDef) DefaultNode() Node
- func (td *BitListTypeDef) Deserialize(dr *codec.DecodingReader) (View, error)
- func (td *BitListTypeDef) FromBits(bits []bool) (*BitListView, error)
- func (td *BitListTypeDef) Limit() uint64
- func (td *BitListTypeDef) New() *BitListView
- func (td *BitListTypeDef) String() string
- func (td *BitListTypeDef) ViewFromBacking(node Node, hook BackingHook) (View, error)
- type BitListView
- func (tv *BitListView) Append(view BoolView) error
- func (tv *BitListView) CheckIndex(i uint64) error
- func (tv *BitListView) Copy() (View, error)
- func (tv *BitListView) Get(i uint64) (BoolView, error)
- func (tv *BitListView) Iter() BitIter
- func (tv *BitListView) Length() (uint64, error)
- func (tv *BitListView) Pop() error
- func (tv *BitListView) ReadonlyIter() BitIter
- func (tv *BitListView) Serialize(w *codec.EncodingWriter) error
- func (tv *BitListView) Set(i uint64, v BoolView) error
- func (tv *BitListView) ValueByteLength() (uint64, error)
- type BitVectorTypeDef
- func (td *BitVectorTypeDef) BottomNodeLength() uint64
- func (td *BitVectorTypeDef) Default(hook BackingHook) View
- func (td *BitVectorTypeDef) DefaultNode() Node
- func (td *BitVectorTypeDef) Deserialize(dr *codec.DecodingReader) (View, error)
- func (td *BitVectorTypeDef) FromBits(bits []bool) (*BitVectorView, error)
- func (td *BitVectorTypeDef) Length() uint64
- func (td *BitVectorTypeDef) New() *BitVectorView
- func (td *BitVectorTypeDef) String() string
- func (td *BitVectorTypeDef) ViewFromBacking(node Node, hook BackingHook) (View, error)
- type BitVectorView
- func (tv *BitVectorView) Copy() (View, error)
- func (tv *BitVectorView) Get(i uint64) (BoolView, error)
- func (tv *BitVectorView) Iter() BitIter
- func (tv *BitVectorView) ReadonlyIter() BitIter
- func (tv *BitVectorView) Serialize(w *codec.EncodingWriter) error
- func (tv *BitVectorView) Set(i uint64, v BoolView) error
- func (tv *BitVectorView) ValueByteLength() (uint64, error)
- type BoolMeta
- func (td BoolMeta) BoolViewFromBitfieldBacking(v *Root, i uint8) (BoolView, error)
- func (td BoolMeta) Default(_ BackingHook) View
- func (td BoolMeta) DefaultNode() Node
- func (td BoolMeta) Deserialize(dr *codec.DecodingReader) (View, error)
- func (td BoolMeta) IsFixedByteLength() bool
- func (td BoolMeta) MaxByteLength() uint64
- func (td BoolMeta) MinByteLength() uint64
- func (td BoolMeta) New() BoolView
- func (td BoolMeta) String() string
- func (td BoolMeta) SubViewFromBacking(v *Root, i uint8) BasicView
- func (td BoolMeta) TypeByteLength() uint64
- func (td BoolMeta) ViewFromBacking(node Node, _ BackingHook) (View, error)
- type BoolView
- func (v BoolView) Backing() Node
- func (v BoolView) BackingFromBase(base *Root, i uint8) *Root
- func (v BoolView) BackingFromBitfieldBase(base *Root, i uint8) *Root
- func (v BoolView) ByteLength() uint64
- func (v BoolView) Copy() (View, error)
- func (v *BoolView) Decode(x []byte) error
- func (v *BoolView) Deserialize(r *codec.DecodingReader) error
- func (v BoolView) Encode() ([]byte, error)
- func (v BoolView) FixedLength() uint64
- func (v BoolView) HashTreeRoot(h HashFn) Root
- func (v BoolView) Serialize(w *codec.EncodingWriter) error
- func (v BoolView) SetBacking(b Node) error
- func (v BoolView) String() string
- func (v BoolView) Type() TypeDef
- func (v BoolView) ValueByteLength() (uint64, error)
- type ByteView
- type ComplexListTypeDef
- func (td *ComplexListTypeDef) Default(hook BackingHook) View
- func (td *ComplexListTypeDef) DefaultNode() Node
- func (td *ComplexListTypeDef) Deserialize(dr *codec.DecodingReader) (View, error)
- func (td *ComplexListTypeDef) ElementType() TypeDef
- func (td *ComplexListTypeDef) FromElements(v ...View) (*ComplexListView, error)
- func (td *ComplexListTypeDef) Limit() uint64
- func (td *ComplexListTypeDef) New() *ComplexListView
- func (td *ComplexListTypeDef) String() string
- func (td *ComplexListTypeDef) ViewFromBacking(node Node, hook BackingHook) (View, error)
- type ComplexListView
- func (tv *ComplexListView) Append(v View) error
- func (tv *ComplexListView) CheckIndex(i uint64) error
- func (tv *ComplexListView) Copy() (View, error)
- func (tv *ComplexListView) Get(i uint64) (View, error)
- func (tv *ComplexListView) ItemHook(i uint64) BackingHook
- func (tv *ComplexListView) Iter() ElemIter
- func (tv *ComplexListView) Length() (uint64, error)
- func (tv *ComplexListView) Pop() error
- func (tv *ComplexListView) ReadonlyIter() ElemIter
- func (tv *ComplexListView) Serialize(w *codec.EncodingWriter) error
- func (tv *ComplexListView) Set(i uint64, v View) error
- func (tv *ComplexListView) ValueByteLength() (uint64, error)
- type ComplexTypeBase
- type ComplexVectorTypeDef
- func (td *ComplexVectorTypeDef) Default(hook BackingHook) View
- func (td *ComplexVectorTypeDef) DefaultNode() Node
- func (td *ComplexVectorTypeDef) Deserialize(dr *codec.DecodingReader) (View, error)
- func (td *ComplexVectorTypeDef) ElementType() TypeDef
- func (td *ComplexVectorTypeDef) FromElements(v ...View) (*ComplexVectorView, error)
- func (td *ComplexVectorTypeDef) Length() uint64
- func (td *ComplexVectorTypeDef) New() *ComplexVectorView
- func (td *ComplexVectorTypeDef) String() string
- func (td *ComplexVectorTypeDef) ViewFromBacking(node Node, hook BackingHook) (View, error)
- type ComplexVectorView
- func (tv *ComplexVectorView) Copy() (View, error)
- func (tv *ComplexVectorView) Get(i uint64) (View, error)
- func (tv *ComplexVectorView) ItemHook(i uint64) BackingHook
- func (tv *ComplexVectorView) Iter() ElemIter
- func (tv *ComplexVectorView) ReadonlyIter() ElemIter
- func (tv *ComplexVectorView) Serialize(w *codec.EncodingWriter) error
- func (tv *ComplexVectorView) Set(i uint64, v View) error
- func (tv *ComplexVectorView) ValueByteLength() (uint64, error)
- type ContainerTypeDef
- func (td *ContainerTypeDef) Default(hook BackingHook) View
- func (td *ContainerTypeDef) DefaultNode() Node
- func (td *ContainerTypeDef) Deserialize(dr *codec.DecodingReader) (View, error)
- func (td *ContainerTypeDef) FieldCount() uint64
- func (td *ContainerTypeDef) FromFields(v ...View) (*ContainerView, error)
- func (td *ContainerTypeDef) New() *ContainerView
- func (td *ContainerTypeDef) String() string
- func (td *ContainerTypeDef) TypeRepr() string
- func (td *ContainerTypeDef) ViewFromBacking(node Node, hook BackingHook) (View, error)
- type ContainerView
- func (tv *ContainerView) Copy() (View, error)
- func (tv *ContainerView) FieldValues() ([]View, error)
- func (tv *ContainerView) Get(i uint64) (View, error)
- func (tv *ContainerView) ItemHook(i uint64) BackingHook
- func (tv *ContainerView) Iter() ElemIter
- func (tv *ContainerView) ReadonlyIter() ElemIter
- func (tv *ContainerView) Serialize(w *codec.EncodingWriter) error
- func (tv *ContainerView) Set(i uint64, v View) error
- func (tv *ContainerView) ValueByteLength() (uint64, error)
- type ElemIter
- type ElemIterFn
- type ErrBitIter
- type ErrElemIter
- type ErrNodeIter
- type FieldDef
- type ListTypeDef
- type NodeIter
- type NodeIterFn
- type RootMeta
- func (m RootMeta) Default(hook BackingHook) View
- func (RootMeta) DefaultNode() Node
- func (m RootMeta) Deserialize(dr *codec.DecodingReader) (View, error)
- func (m RootMeta) IsFixedByteLength() bool
- func (m RootMeta) MaxByteLength() uint64
- func (m RootMeta) MinByteLength() uint64
- func (m RootMeta) Name() string
- func (m RootMeta) String() string
- func (m RootMeta) TypeByteLength() uint64
- func (RootMeta) ViewFromBacking(node Node, _ BackingHook) (View, error)
- type RootView
- func (r *RootView) Backing() Node
- func (r *RootView) Copy() (View, error)
- func (r *RootView) HashTreeRoot(h HashFn) Root
- func (r *RootView) MarshalText() ([]byte, error)
- func (r *RootView) Serialize(w *codec.EncodingWriter) error
- func (r *RootView) SetBacking(b Node) error
- func (r *RootView) String() string
- func (r *RootView) Type() TypeDef
- func (r *RootView) UnmarshalText(text []byte) error
- func (r *RootView) ValueByteLength() (uint64, error)
- type SmallByteVecMeta
- func (td SmallByteVecMeta) Default(_ BackingHook) View
- func (td SmallByteVecMeta) DefaultNode() Node
- func (td SmallByteVecMeta) Deserialize(dr *codec.DecodingReader) (View, error)
- func (td SmallByteVecMeta) IsFixedByteLength() bool
- func (td SmallByteVecMeta) MaxByteLength() uint64
- func (td SmallByteVecMeta) MinByteLength() uint64
- func (td SmallByteVecMeta) New() SmallByteVecView
- func (td SmallByteVecMeta) String() string
- func (td SmallByteVecMeta) TypeByteLength() uint64
- func (td SmallByteVecMeta) ViewFromBacking(node Node, _ BackingHook) (View, error)
- type SmallByteVecView
- func (v SmallByteVecView) Backing() Node
- func (v SmallByteVecView) Copy() (View, error)
- func (v SmallByteVecView) HashTreeRoot(h HashFn) Root
- func (v SmallByteVecView) MarshalText() ([]byte, error)
- func (v SmallByteVecView) Serialize(w *codec.EncodingWriter) error
- func (v SmallByteVecView) SetBacking(b Node) error
- func (v SmallByteVecView) String() string
- func (v SmallByteVecView) Type() TypeDef
- func (v SmallByteVecView) UnmarshalText(text []byte) error
- func (v SmallByteVecView) ValueByteLength() (uint64, error)
- type SubtreeView
- type TypeDef
- type Uint16View
- func (v Uint16View) Backing() Node
- func (v Uint16View) BackingFromBase(base *Root, i uint8) *Root
- func (v Uint16View) ByteLength() uint64
- func (v Uint16View) Copy() (View, error)
- func (v *Uint16View) Decode(x []byte) error
- func (v *Uint16View) Deserialize(r *codec.DecodingReader) error
- func (v Uint16View) Encode() ([]byte, error)
- func (v Uint16View) FixedLength() uint64
- func (v Uint16View) HashTreeRoot(h HashFn) Root
- func (v Uint16View) MarshalJSON() ([]byte, error)
- func (v Uint16View) MarshalText() (out []byte, err error)
- func (v Uint16View) Serialize(w *codec.EncodingWriter) error
- func (v Uint16View) SetBacking(b Node) error
- func (v Uint16View) String() string
- func (v Uint16View) Type() TypeDef
- func (v *Uint16View) UnmarshalJSON(b []byte) error
- func (v *Uint16View) UnmarshalText(b []byte) error
- func (v Uint16View) ValueByteLength() (uint64, error)
- type Uint256View
- func (v Uint256View) Backing() Node
- func (v Uint256View) BackingFromBase(base *Root, i uint8) *Root
- func (v Uint256View) ByteLength() uint64
- func (v Uint256View) Bytes() []byte
- func (v Uint256View) Bytes32() (out [32]byte)
- func (v Uint256View) Copy() (View, error)
- func (v *Uint256View) Decode(x []byte) error
- func (v *Uint256View) Deserialize(r *codec.DecodingReader) error
- func (v Uint256View) Encode() ([]byte, error)
- func (v Uint256View) FixedLength() uint64
- func (v Uint256View) HashTreeRoot(h HashFn) Root
- func (v Uint256View) MarshalJSON() ([]byte, error)
- func (v Uint256View) MarshalText() (out []byte, err error)
- func (v Uint256View) Serialize(w *codec.EncodingWriter) error
- func (v Uint256View) SetBacking(b Node) error
- func (v *Uint256View) SetBytes32(data [32]byte)
- func (v *Uint256View) SetFromBig(x *big.Int) (overflow bool)
- func (v Uint256View) String() string
- func (v Uint256View) Type() TypeDef
- func (v *Uint256View) UnmarshalJSON(b []byte) error
- func (v *Uint256View) UnmarshalText(b []byte) error
- func (v Uint256View) ValueByteLength() (uint64, error)
- type Uint32View
- func (v Uint32View) Backing() Node
- func (v Uint32View) BackingFromBase(base *Root, i uint8) *Root
- func (v Uint32View) ByteLength() uint64
- func (v Uint32View) Copy() (View, error)
- func (v *Uint32View) Decode(x []byte) error
- func (v *Uint32View) Deserialize(r *codec.DecodingReader) error
- func (v Uint32View) Encode() ([]byte, error)
- func (v Uint32View) FixedLength() uint64
- func (v Uint32View) HashTreeRoot(h HashFn) Root
- func (v Uint32View) MarshalJSON() ([]byte, error)
- func (v Uint32View) MarshalText() (out []byte, err error)
- func (v Uint32View) Serialize(w *codec.EncodingWriter) error
- func (v Uint32View) SetBacking(b Node) error
- func (v Uint32View) String() string
- func (v Uint32View) Type() TypeDef
- func (v *Uint32View) UnmarshalJSON(b []byte) error
- func (v *Uint32View) UnmarshalText(b []byte) error
- func (v Uint32View) ValueByteLength() (uint64, error)
- type Uint64View
- func (v Uint64View) Backing() Node
- func (v Uint64View) BackingFromBase(base *Root, i uint8) *Root
- func (v Uint64View) ByteLength() uint64
- func (v Uint64View) Copy() (View, error)
- func (v *Uint64View) Decode(x []byte) error
- func (v *Uint64View) Deserialize(r *codec.DecodingReader) error
- func (v Uint64View) Encode() ([]byte, error)
- func (v Uint64View) FixedLength() uint64
- func (v Uint64View) HashTreeRoot(h HashFn) Root
- func (v Uint64View) MarshalJSON() ([]byte, error)
- func (v Uint64View) MarshalText() (out []byte, err error)
- func (v Uint64View) Serialize(w *codec.EncodingWriter) error
- func (v Uint64View) SetBacking(b Node) error
- func (v Uint64View) String() string
- func (v Uint64View) Type() TypeDef
- func (v *Uint64View) UnmarshalJSON(b []byte) error
- func (v *Uint64View) UnmarshalText(b []byte) error
- func (v Uint64View) ValueByteLength() (uint64, error)
- type Uint8View
- func (v Uint8View) Backing() Node
- func (v Uint8View) BackingFromBase(base *Root, i uint8) *Root
- func (v Uint8View) ByteLength() uint64
- func (v Uint8View) Copy() (View, error)
- func (v *Uint8View) Decode(x []byte) error
- func (v *Uint8View) Deserialize(r *codec.DecodingReader) error
- func (v Uint8View) Encode() ([]byte, error)
- func (v Uint8View) FixedLength() uint64
- func (v Uint8View) HashTreeRoot(h HashFn) Root
- func (v Uint8View) MarshalJSON() ([]byte, error)
- func (v Uint8View) MarshalText() (out []byte, err error)
- func (v Uint8View) Serialize(w *codec.EncodingWriter) error
- func (v Uint8View) SetBacking(b Node) error
- func (v Uint8View) String() string
- func (v Uint8View) Type() TypeDef
- func (v *Uint8View) UnmarshalJSON(b []byte) error
- func (v *Uint8View) UnmarshalText(b []byte) error
- func (v Uint8View) ValueByteLength() (uint64, error)
- type UintMeta
- func (td UintMeta) BasicViewFromBacking(v *Root, i uint8) (BasicView, error)
- func (td UintMeta) Default(_ BackingHook) View
- func (td UintMeta) DefaultNode() Node
- func (td UintMeta) Deserialize(dr *codec.DecodingReader) (View, error)
- func (td UintMeta) IsFixedByteLength() bool
- func (td UintMeta) MaxByteLength() uint64
- func (td UintMeta) MinByteLength() uint64
- func (td UintMeta) New() BasicView
- func (td UintMeta) PackViews(views []BasicView) ([]Node, error)
- func (td UintMeta) String() string
- func (td UintMeta) TypeByteLength() uint64
- func (td UintMeta) ViewFromBacking(node Node, _ BackingHook) (View, error)
- type UnionTypeDef
- func (td *UnionTypeDef) Default(hook BackingHook) View
- func (td *UnionTypeDef) DefaultNode() Node
- func (td *UnionTypeDef) Deserialize(dr *codec.DecodingReader) (View, error)
- func (td *UnionTypeDef) FromView(selector uint8, v View) (*UnionView, error)
- func (td *UnionTypeDef) New() *UnionView
- func (td *UnionTypeDef) String() string
- func (td *UnionTypeDef) TypeRepr() string
- func (td *UnionTypeDef) ViewFromBacking(node Node, hook BackingHook) (View, error)
- type UnionView
- func (tv *UnionView) Change(selector uint8, value View) error
- func (tv *UnionView) Copy() (View, error)
- func (tv *UnionView) Selector() (uint8, error)
- func (tv *UnionView) Serialize(w *codec.EncodingWriter) error
- func (tv *UnionView) Value() (View, error)
- func (tv *UnionView) ValueByteLength() (uint64, error)
- type VectorTypeDef
- type View
- type ViewBase
Constants ¶
View Source
const ByteType = Uint8Type
Alias to Uint8Type
View Source
const OffsetByteLength = 4
Variables ¶
View Source
var BadLengthError = errors.New("scope is wrong")
View Source
var BasicViewNoSetBackingError = errors.New("basic views cannot set new backing")
View Source
var UnsupportedUintType = errors.New("unsupported uint type")
Functions ¶
func ByteBitIndex ¶
Get index of left-most 1 bit. 0 (incl.) to 8 (excl.)
func BytesIntoNodes ¶
Types ¶
type BackedView ¶
type BackedView struct { ViewBase Hook BackingHook BackingNode Node }
func (*BackedView) Backing ¶
func (v *BackedView) Backing() Node
func (*BackedView) Copy ¶
func (v *BackedView) Copy() (View, error)
func (*BackedView) Default ¶
func (v *BackedView) Default(hook BackingHook) (View, error)
func (*BackedView) HashTreeRoot ¶
func (v *BackedView) HashTreeRoot(h HashFn) Root
func (*BackedView) SetBacking ¶
func (v *BackedView) SetBacking(b Node) error
type BackingHook ¶
type BackingHook func(b Node) error
func (BackingHook) PropagateChangeMaybe ¶
func (vh BackingHook) PropagateChangeMaybe(b Node) error
type BasicListTypeDef ¶
type BasicListTypeDef struct { ElemType BasicTypeDef ListLimit uint64 ComplexTypeBase }
func BasicListType ¶
func BasicListType(elemType BasicTypeDef, limit uint64) *BasicListTypeDef
func (*BasicListTypeDef) BottomNodeLimit ¶
func (td *BasicListTypeDef) BottomNodeLimit() uint64
func (*BasicListTypeDef) Default ¶
func (td *BasicListTypeDef) Default(hook BackingHook) View
func (*BasicListTypeDef) DefaultNode ¶
func (td *BasicListTypeDef) DefaultNode() Node
func (*BasicListTypeDef) Deserialize ¶
func (td *BasicListTypeDef) Deserialize(dr *codec.DecodingReader) (View, error)
func (*BasicListTypeDef) ElementType ¶
func (td *BasicListTypeDef) ElementType() TypeDef
func (*BasicListTypeDef) ElementsPerBottomNode ¶
func (td *BasicListTypeDef) ElementsPerBottomNode() uint64
func (*BasicListTypeDef) FromElements ¶
func (td *BasicListTypeDef) FromElements(v ...BasicView) (*BasicListView, error)
func (*BasicListTypeDef) Limit ¶
func (td *BasicListTypeDef) Limit() uint64
func (*BasicListTypeDef) New ¶
func (td *BasicListTypeDef) New() *BasicListView
func (*BasicListTypeDef) String ¶
func (td *BasicListTypeDef) String() string
func (*BasicListTypeDef) TranslateIndex ¶
func (td *BasicListTypeDef) TranslateIndex(index uint64) (nodeIndex uint64, intraNodeIndex uint8)
func (*BasicListTypeDef) ViewFromBacking ¶
func (td *BasicListTypeDef) ViewFromBacking(node Node, hook BackingHook) (View, error)
type BasicListView ¶
type BasicListView struct { SubtreeView *BasicListTypeDef }
func AsBasicList ¶
func AsBasicList(v View, err error) (*BasicListView, error)
func (*BasicListView) Append ¶
func (tv *BasicListView) Append(view BasicView) error
func (*BasicListView) CheckIndex ¶
func (tv *BasicListView) CheckIndex(i uint64) error
func (*BasicListView) Copy ¶
func (tv *BasicListView) Copy() (View, error)
func (*BasicListView) Iter ¶
func (tv *BasicListView) Iter() ElemIter
func (*BasicListView) Length ¶
func (tv *BasicListView) Length() (uint64, error)
func (*BasicListView) Pop ¶
func (tv *BasicListView) Pop() error
func (*BasicListView) ReadonlyIter ¶
func (tv *BasicListView) ReadonlyIter() ElemIter
func (*BasicListView) Serialize ¶
func (tv *BasicListView) Serialize(w *codec.EncodingWriter) error
func (*BasicListView) ValueByteLength ¶
func (tv *BasicListView) ValueByteLength() (uint64, error)
func (*BasicListView) ViewRoot ¶
func (tv *BasicListView) ViewRoot(h HashFn) Root
type BasicTypeDef ¶
type BasicVectorTypeDef ¶
type BasicVectorTypeDef struct { ElemType BasicTypeDef VectorLength uint64 ComplexTypeBase }
func BasicVectorType ¶
func BasicVectorType(elemType BasicTypeDef, length uint64) *BasicVectorTypeDef
func (*BasicVectorTypeDef) BottomNodeLength ¶
func (td *BasicVectorTypeDef) BottomNodeLength() uint64
func (*BasicVectorTypeDef) Default ¶
func (td *BasicVectorTypeDef) Default(hook BackingHook) View
func (*BasicVectorTypeDef) DefaultNode ¶
func (td *BasicVectorTypeDef) DefaultNode() Node
func (*BasicVectorTypeDef) Deserialize ¶
func (td *BasicVectorTypeDef) Deserialize(dr *codec.DecodingReader) (View, error)
func (*BasicVectorTypeDef) ElementType ¶
func (td *BasicVectorTypeDef) ElementType() TypeDef
func (*BasicVectorTypeDef) ElementsPerBottomNode ¶
func (td *BasicVectorTypeDef) ElementsPerBottomNode() uint64
func (*BasicVectorTypeDef) FromElements ¶
func (td *BasicVectorTypeDef) FromElements(v ...BasicView) (*BasicVectorView, error)
func (*BasicVectorTypeDef) Length ¶
func (td *BasicVectorTypeDef) Length() uint64
func (*BasicVectorTypeDef) New ¶
func (td *BasicVectorTypeDef) New() *BasicVectorView
func (*BasicVectorTypeDef) String ¶
func (td *BasicVectorTypeDef) String() string
func (*BasicVectorTypeDef) TranslateIndex ¶
func (td *BasicVectorTypeDef) TranslateIndex(index uint64) (nodeIndex uint64, intraNodeIndex uint8)
func (*BasicVectorTypeDef) ViewFromBacking ¶
func (td *BasicVectorTypeDef) ViewFromBacking(node Node, hook BackingHook) (View, error)
type BasicVectorView ¶
type BasicVectorView struct { SubtreeView *BasicVectorTypeDef }
func AsBasicVector ¶
func AsBasicVector(v View, err error) (*BasicVectorView, error)
func (*BasicVectorView) Copy ¶
func (tv *BasicVectorView) Copy() (View, error)
func (*BasicVectorView) Iter ¶
func (tv *BasicVectorView) Iter() ElemIter
func (*BasicVectorView) ReadonlyIter ¶
func (tv *BasicVectorView) ReadonlyIter() ElemIter
func (*BasicVectorView) Serialize ¶
func (tv *BasicVectorView) Serialize(w *codec.EncodingWriter) error
func (*BasicVectorView) ValueByteLength ¶
func (tv *BasicVectorView) ValueByteLength() (uint64, error)
type BitListTypeDef ¶
type BitListTypeDef struct { BitLimit uint64 ComplexTypeBase }
func BitListType ¶
func BitListType(limit uint64) *BitListTypeDef
func (*BitListTypeDef) BottomNodeLimit ¶
func (td *BitListTypeDef) BottomNodeLimit() uint64
func (*BitListTypeDef) Default ¶
func (td *BitListTypeDef) Default(hook BackingHook) View
func (*BitListTypeDef) DefaultNode ¶
func (td *BitListTypeDef) DefaultNode() Node
func (*BitListTypeDef) Deserialize ¶
func (td *BitListTypeDef) Deserialize(dr *codec.DecodingReader) (View, error)
func (*BitListTypeDef) FromBits ¶
func (td *BitListTypeDef) FromBits(bits []bool) (*BitListView, error)
func (*BitListTypeDef) Limit ¶
func (td *BitListTypeDef) Limit() uint64
func (*BitListTypeDef) New ¶
func (td *BitListTypeDef) New() *BitListView
func (*BitListTypeDef) String ¶
func (td *BitListTypeDef) String() string
func (*BitListTypeDef) ViewFromBacking ¶
func (td *BitListTypeDef) ViewFromBacking(node Node, hook BackingHook) (View, error)
type BitListView ¶
type BitListView struct { SubtreeView *BitListTypeDef }
func (*BitListView) Append ¶
func (tv *BitListView) Append(view BoolView) error
func (*BitListView) CheckIndex ¶
func (tv *BitListView) CheckIndex(i uint64) error
func (*BitListView) Copy ¶
func (tv *BitListView) Copy() (View, error)
func (*BitListView) Iter ¶
func (tv *BitListView) Iter() BitIter
func (*BitListView) Length ¶
func (tv *BitListView) Length() (uint64, error)
func (*BitListView) Pop ¶
func (tv *BitListView) Pop() error
func (*BitListView) ReadonlyIter ¶
func (tv *BitListView) ReadonlyIter() BitIter
func (*BitListView) Serialize ¶
func (tv *BitListView) Serialize(w *codec.EncodingWriter) error
func (*BitListView) ValueByteLength ¶
func (tv *BitListView) ValueByteLength() (uint64, error)
type BitVectorTypeDef ¶
type BitVectorTypeDef struct { BitLength uint64 ComplexTypeBase }
func BitVectorType ¶
func BitVectorType(length uint64) *BitVectorTypeDef
func (*BitVectorTypeDef) BottomNodeLength ¶
func (td *BitVectorTypeDef) BottomNodeLength() uint64
func (*BitVectorTypeDef) Default ¶
func (td *BitVectorTypeDef) Default(hook BackingHook) View
func (*BitVectorTypeDef) DefaultNode ¶
func (td *BitVectorTypeDef) DefaultNode() Node
func (*BitVectorTypeDef) Deserialize ¶
func (td *BitVectorTypeDef) Deserialize(dr *codec.DecodingReader) (View, error)
func (*BitVectorTypeDef) FromBits ¶
func (td *BitVectorTypeDef) FromBits(bits []bool) (*BitVectorView, error)
func (*BitVectorTypeDef) Length ¶
func (td *BitVectorTypeDef) Length() uint64
func (*BitVectorTypeDef) New ¶
func (td *BitVectorTypeDef) New() *BitVectorView
func (*BitVectorTypeDef) String ¶
func (td *BitVectorTypeDef) String() string
func (*BitVectorTypeDef) ViewFromBacking ¶
func (td *BitVectorTypeDef) ViewFromBacking(node Node, hook BackingHook) (View, error)
type BitVectorView ¶
type BitVectorView struct { SubtreeView *BitVectorTypeDef }
func AsBitVector ¶
func AsBitVector(v View, err error) (*BitVectorView, error)
func (*BitVectorView) Copy ¶
func (tv *BitVectorView) Copy() (View, error)
func (*BitVectorView) Iter ¶
func (tv *BitVectorView) Iter() BitIter
func (*BitVectorView) ReadonlyIter ¶
func (tv *BitVectorView) ReadonlyIter() BitIter
func (*BitVectorView) Serialize ¶
func (tv *BitVectorView) Serialize(w *codec.EncodingWriter) error
func (*BitVectorView) ValueByteLength ¶
func (tv *BitVectorView) ValueByteLength() (uint64, error)
type BoolMeta ¶
type BoolMeta uint8
const BoolType BoolMeta = 0
func (BoolMeta) BoolViewFromBitfieldBacking ¶
func (BoolMeta) Default ¶
func (td BoolMeta) Default(_ BackingHook) View
func (BoolMeta) DefaultNode ¶
func (td BoolMeta) DefaultNode() Node
func (BoolMeta) Deserialize ¶
func (td BoolMeta) Deserialize(dr *codec.DecodingReader) (View, error)
func (BoolMeta) IsFixedByteLength ¶
func (BoolMeta) MaxByteLength ¶
func (BoolMeta) MinByteLength ¶
func (BoolMeta) SubViewFromBacking ¶
func (BoolMeta) TypeByteLength ¶
func (BoolMeta) ViewFromBacking ¶
func (td BoolMeta) ViewFromBacking(node Node, _ BackingHook) (View, error)
type BoolView ¶
type BoolView bool
func (BoolView) BackingFromBase ¶
func (BoolView) BackingFromBitfieldBase ¶
func (BoolView) ByteLength ¶ added in v0.1.0
func (*BoolView) Deserialize ¶ added in v0.1.0
func (v *BoolView) Deserialize(r *codec.DecodingReader) error
func (BoolView) FixedLength ¶ added in v0.1.0
func (BoolView) HashTreeRoot ¶
func (v BoolView) HashTreeRoot(h HashFn) Root
func (BoolView) SetBacking ¶
func (BoolView) ValueByteLength ¶
type ComplexListTypeDef ¶
type ComplexListTypeDef struct { ElemType TypeDef ListLimit uint64 ComplexTypeBase }
func ComplexListType ¶
func ComplexListType(elemType TypeDef, limit uint64) *ComplexListTypeDef
func (*ComplexListTypeDef) Default ¶
func (td *ComplexListTypeDef) Default(hook BackingHook) View
func (*ComplexListTypeDef) DefaultNode ¶
func (td *ComplexListTypeDef) DefaultNode() Node
func (*ComplexListTypeDef) Deserialize ¶
func (td *ComplexListTypeDef) Deserialize(dr *codec.DecodingReader) (View, error)
func (*ComplexListTypeDef) ElementType ¶
func (td *ComplexListTypeDef) ElementType() TypeDef
func (*ComplexListTypeDef) FromElements ¶
func (td *ComplexListTypeDef) FromElements(v ...View) (*ComplexListView, error)
func (*ComplexListTypeDef) Limit ¶
func (td *ComplexListTypeDef) Limit() uint64
func (*ComplexListTypeDef) New ¶
func (td *ComplexListTypeDef) New() *ComplexListView
func (*ComplexListTypeDef) String ¶
func (td *ComplexListTypeDef) String() string
func (*ComplexListTypeDef) ViewFromBacking ¶
func (td *ComplexListTypeDef) ViewFromBacking(node Node, hook BackingHook) (View, error)
type ComplexListView ¶
type ComplexListView struct { SubtreeView *ComplexListTypeDef }
func AsComplexList ¶
func AsComplexList(v View, err error) (*ComplexListView, error)
func (*ComplexListView) Append ¶
func (tv *ComplexListView) Append(v View) error
func (*ComplexListView) CheckIndex ¶
func (tv *ComplexListView) CheckIndex(i uint64) error
func (*ComplexListView) Copy ¶
func (tv *ComplexListView) Copy() (View, error)
func (*ComplexListView) ItemHook ¶
func (tv *ComplexListView) ItemHook(i uint64) BackingHook
func (*ComplexListView) Iter ¶
func (tv *ComplexListView) Iter() ElemIter
func (*ComplexListView) Length ¶
func (tv *ComplexListView) Length() (uint64, error)
func (*ComplexListView) Pop ¶
func (tv *ComplexListView) Pop() error
func (*ComplexListView) ReadonlyIter ¶
func (tv *ComplexListView) ReadonlyIter() ElemIter
func (*ComplexListView) Serialize ¶
func (tv *ComplexListView) Serialize(w *codec.EncodingWriter) error
func (*ComplexListView) ValueByteLength ¶
func (tv *ComplexListView) ValueByteLength() (uint64, error)
type ComplexTypeBase ¶
func (*ComplexTypeBase) IsFixedByteLength ¶
func (td *ComplexTypeBase) IsFixedByteLength() bool
func (*ComplexTypeBase) MaxByteLength ¶
func (td *ComplexTypeBase) MaxByteLength() uint64
func (*ComplexTypeBase) MinByteLength ¶
func (td *ComplexTypeBase) MinByteLength() uint64
func (*ComplexTypeBase) TypeByteLength ¶
func (td *ComplexTypeBase) TypeByteLength() uint64
type ComplexVectorTypeDef ¶
type ComplexVectorTypeDef struct { ElemType TypeDef VectorLength uint64 ComplexTypeBase }
func ComplexVectorType ¶
func ComplexVectorType(elemType TypeDef, length uint64) *ComplexVectorTypeDef
func (*ComplexVectorTypeDef) Default ¶
func (td *ComplexVectorTypeDef) Default(hook BackingHook) View
func (*ComplexVectorTypeDef) DefaultNode ¶
func (td *ComplexVectorTypeDef) DefaultNode() Node
func (*ComplexVectorTypeDef) Deserialize ¶
func (td *ComplexVectorTypeDef) Deserialize(dr *codec.DecodingReader) (View, error)
func (*ComplexVectorTypeDef) ElementType ¶
func (td *ComplexVectorTypeDef) ElementType() TypeDef
func (*ComplexVectorTypeDef) FromElements ¶
func (td *ComplexVectorTypeDef) FromElements(v ...View) (*ComplexVectorView, error)
func (*ComplexVectorTypeDef) Length ¶
func (td *ComplexVectorTypeDef) Length() uint64
func (*ComplexVectorTypeDef) New ¶
func (td *ComplexVectorTypeDef) New() *ComplexVectorView
func (*ComplexVectorTypeDef) String ¶
func (td *ComplexVectorTypeDef) String() string
func (*ComplexVectorTypeDef) ViewFromBacking ¶
func (td *ComplexVectorTypeDef) ViewFromBacking(node Node, hook BackingHook) (View, error)
type ComplexVectorView ¶
type ComplexVectorView struct { SubtreeView *ComplexVectorTypeDef }
func AsComplexVector ¶
func AsComplexVector(v View, err error) (*ComplexVectorView, error)
func (*ComplexVectorView) Copy ¶
func (tv *ComplexVectorView) Copy() (View, error)
func (*ComplexVectorView) ItemHook ¶
func (tv *ComplexVectorView) ItemHook(i uint64) BackingHook
func (*ComplexVectorView) Iter ¶
func (tv *ComplexVectorView) Iter() ElemIter
func (*ComplexVectorView) ReadonlyIter ¶
func (tv *ComplexVectorView) ReadonlyIter() ElemIter
func (*ComplexVectorView) Serialize ¶
func (tv *ComplexVectorView) Serialize(w *codec.EncodingWriter) error
func (*ComplexVectorView) ValueByteLength ¶
func (tv *ComplexVectorView) ValueByteLength() (uint64, error)
type ContainerTypeDef ¶
type ContainerTypeDef struct { ComplexTypeBase ContainerName string Fields []FieldDef OffsetsCount uint64 FixedPartSize uint64 }
func ContainerType ¶
func ContainerType(name string, fields []FieldDef) *ContainerTypeDef
func (*ContainerTypeDef) Default ¶
func (td *ContainerTypeDef) Default(hook BackingHook) View
func (*ContainerTypeDef) DefaultNode ¶
func (td *ContainerTypeDef) DefaultNode() Node
func (*ContainerTypeDef) Deserialize ¶
func (td *ContainerTypeDef) Deserialize(dr *codec.DecodingReader) (View, error)
func (*ContainerTypeDef) FieldCount ¶
func (td *ContainerTypeDef) FieldCount() uint64
func (*ContainerTypeDef) FromFields ¶
func (td *ContainerTypeDef) FromFields(v ...View) (*ContainerView, error)
func (*ContainerTypeDef) New ¶
func (td *ContainerTypeDef) New() *ContainerView
func (*ContainerTypeDef) String ¶
func (td *ContainerTypeDef) String() string
func (*ContainerTypeDef) TypeRepr ¶
func (td *ContainerTypeDef) TypeRepr() string
func (*ContainerTypeDef) ViewFromBacking ¶
func (td *ContainerTypeDef) ViewFromBacking(node Node, hook BackingHook) (View, error)
type ContainerView ¶
type ContainerView struct { SubtreeView *ContainerTypeDef }
func AsContainer ¶
func AsContainer(v View, err error) (*ContainerView, error)
func (*ContainerView) Copy ¶
func (tv *ContainerView) Copy() (View, error)
func (*ContainerView) FieldValues ¶
func (tv *ContainerView) FieldValues() ([]View, error)
func (*ContainerView) ItemHook ¶
func (tv *ContainerView) ItemHook(i uint64) BackingHook
func (*ContainerView) Iter ¶
func (tv *ContainerView) Iter() ElemIter
func (*ContainerView) ReadonlyIter ¶
func (tv *ContainerView) ReadonlyIter() ElemIter
func (*ContainerView) Serialize ¶
func (tv *ContainerView) Serialize(w *codec.EncodingWriter) error
func (*ContainerView) ValueByteLength ¶
func (tv *ContainerView) ValueByteLength() (uint64, error)
type ElemIterFn ¶
type ErrBitIter ¶
type ErrBitIter struct {
// contains filtered or unexported fields
}
type ErrElemIter ¶
type ErrElemIter struct {
// contains filtered or unexported fields
}
type ErrNodeIter ¶
type ErrNodeIter struct {
// contains filtered or unexported fields
}
func (ErrNodeIter) Next ¶
func (e ErrNodeIter) Next() (chunk Node, ok bool, err error)
type ListTypeDef ¶
func ListType ¶
func ListType(elemType TypeDef, limit uint64) ListTypeDef
type NodeIterFn ¶
func (NodeIterFn) Next ¶
func (f NodeIterFn) Next() (chunk Node, ok bool, err error)
type RootMeta ¶
type RootMeta uint8
const RootType RootMeta = 0
func (RootMeta) Default ¶
func (m RootMeta) Default(hook BackingHook) View
func (RootMeta) DefaultNode ¶
func (RootMeta) DefaultNode() Node
func (RootMeta) Deserialize ¶
func (m RootMeta) Deserialize(dr *codec.DecodingReader) (View, error)
func (RootMeta) IsFixedByteLength ¶
func (RootMeta) MaxByteLength ¶
func (RootMeta) MinByteLength ¶
func (RootMeta) TypeByteLength ¶
func (RootMeta) ViewFromBacking ¶
func (RootMeta) ViewFromBacking(node Node, _ BackingHook) (View, error)
type RootView ¶
type RootView Root
func (*RootView) Backing ¶
func (r *RootView) Backing() Node
Backing, a root can be used as a view representing itself.
func (*RootView) HashTreeRoot ¶
func (r *RootView) HashTreeRoot(h HashFn) Root
func (*RootView) MarshalText ¶ added in v0.1.1
func (*RootView) SetBacking ¶
func (*RootView) UnmarshalText ¶ added in v0.1.1
func (*RootView) ValueByteLength ¶
type SmallByteVecMeta ¶
type SmallByteVecMeta uint8
To represent views of < 32 bytes efficiently as just a slice of those bytes. Values above 32 are invalid. For 32, using Root ([32]byte as underlying type) is better.
const Bytes16Type SmallByteVecMeta = 16
const Bytes4Type SmallByteVecMeta = 4
const Bytes8Type SmallByteVecMeta = 8
func (SmallByteVecMeta) Default ¶
func (td SmallByteVecMeta) Default(_ BackingHook) View
func (SmallByteVecMeta) DefaultNode ¶
func (td SmallByteVecMeta) DefaultNode() Node
func (SmallByteVecMeta) Deserialize ¶
func (td SmallByteVecMeta) Deserialize(dr *codec.DecodingReader) (View, error)
func (SmallByteVecMeta) IsFixedByteLength ¶
func (td SmallByteVecMeta) IsFixedByteLength() bool
func (SmallByteVecMeta) MaxByteLength ¶
func (td SmallByteVecMeta) MaxByteLength() uint64
func (SmallByteVecMeta) MinByteLength ¶
func (td SmallByteVecMeta) MinByteLength() uint64
func (SmallByteVecMeta) New ¶
func (td SmallByteVecMeta) New() SmallByteVecView
func (SmallByteVecMeta) String ¶
func (td SmallByteVecMeta) String() string
func (SmallByteVecMeta) TypeByteLength ¶
func (td SmallByteVecMeta) TypeByteLength() uint64
func (SmallByteVecMeta) ViewFromBacking ¶
func (td SmallByteVecMeta) ViewFromBacking(node Node, _ BackingHook) (View, error)
type SmallByteVecView ¶
type SmallByteVecView []byte
func AsSmallByteVec ¶
func AsSmallByteVec(v View, err error) (SmallByteVecView, error)
func (SmallByteVecView) Backing ¶
func (v SmallByteVecView) Backing() Node
func (SmallByteVecView) Copy ¶
func (v SmallByteVecView) Copy() (View, error)
func (SmallByteVecView) HashTreeRoot ¶
func (v SmallByteVecView) HashTreeRoot(h HashFn) Root
func (SmallByteVecView) MarshalText ¶ added in v0.1.1
func (v SmallByteVecView) MarshalText() ([]byte, error)
func (SmallByteVecView) Serialize ¶
func (v SmallByteVecView) Serialize(w *codec.EncodingWriter) error
func (SmallByteVecView) SetBacking ¶
func (v SmallByteVecView) SetBacking(b Node) error
func (SmallByteVecView) String ¶ added in v0.1.2
func (v SmallByteVecView) String() string
func (SmallByteVecView) Type ¶
func (v SmallByteVecView) Type() TypeDef
func (SmallByteVecView) UnmarshalText ¶ added in v0.1.1
func (v SmallByteVecView) UnmarshalText(text []byte) error
func (SmallByteVecView) ValueByteLength ¶
func (v SmallByteVecView) ValueByteLength() (uint64, error)
type SubtreeView ¶
type SubtreeView struct { BackedView // contains filtered or unexported fields }
func (*SubtreeView) GetNode ¶
func (stv *SubtreeView) GetNode(i uint64) (Node, error)
func (*SubtreeView) SetNode ¶
func (stv *SubtreeView) SetNode(i uint64, node Node) error
type TypeDef ¶
type TypeDef interface { Default(hook BackingHook) View DefaultNode() Node ViewFromBacking(node Node, hook BackingHook) (View, error) IsFixedByteLength() bool // 0 if there type has no single fixed byte length TypeByteLength() uint64 MinByteLength() uint64 MaxByteLength() uint64 Deserialize(dr *codec.DecodingReader) (View, error) String() string }
type Uint16View ¶
type Uint16View uint16
func (Uint16View) Backing ¶
func (v Uint16View) Backing() Node
func (Uint16View) BackingFromBase ¶
func (v Uint16View) BackingFromBase(base *Root, i uint8) *Root
func (Uint16View) ByteLength ¶ added in v0.1.0
func (v Uint16View) ByteLength() uint64
func (Uint16View) Copy ¶
func (v Uint16View) Copy() (View, error)
func (*Uint16View) Decode ¶ added in v0.1.0
func (v *Uint16View) Decode(x []byte) error
func (*Uint16View) Deserialize ¶ added in v0.1.0
func (v *Uint16View) Deserialize(r *codec.DecodingReader) error
func (Uint16View) Encode ¶ added in v0.1.0
func (v Uint16View) Encode() ([]byte, error)
func (Uint16View) FixedLength ¶ added in v0.1.0
func (v Uint16View) FixedLength() uint64
func (Uint16View) HashTreeRoot ¶
func (v Uint16View) HashTreeRoot(h HashFn) Root
func (Uint16View) MarshalJSON ¶ added in v0.2.0
func (v Uint16View) MarshalJSON() ([]byte, error)
func (Uint16View) MarshalText ¶ added in v0.2.0
func (v Uint16View) MarshalText() (out []byte, err error)
func (Uint16View) Serialize ¶
func (v Uint16View) Serialize(w *codec.EncodingWriter) error
func (Uint16View) SetBacking ¶
func (v Uint16View) SetBacking(b Node) error
func (Uint16View) String ¶ added in v0.1.2
func (v Uint16View) String() string
func (Uint16View) Type ¶
func (v Uint16View) Type() TypeDef
func (*Uint16View) UnmarshalJSON ¶ added in v0.2.0
func (v *Uint16View) UnmarshalJSON(b []byte) error
func (*Uint16View) UnmarshalText ¶ added in v0.2.0
func (v *Uint16View) UnmarshalText(b []byte) error
func (Uint16View) ValueByteLength ¶
func (v Uint16View) ValueByteLength() (uint64, error)
type Uint256View ¶ added in v0.2.0
func MustUint256 ¶ added in v0.2.0
func MustUint256(v string) Uint256View
func (Uint256View) Backing ¶ added in v0.2.0
func (v Uint256View) Backing() Node
func (Uint256View) BackingFromBase ¶ added in v0.2.0
func (v Uint256View) BackingFromBase(base *Root, i uint8) *Root
func (Uint256View) ByteLength ¶ added in v0.2.0
func (v Uint256View) ByteLength() uint64
func (Uint256View) Bytes ¶ added in v0.2.0
func (v Uint256View) Bytes() []byte
Bytes returns little endian encoding (always 32 bytes)
func (Uint256View) Bytes32 ¶ added in v0.2.0
func (v Uint256View) Bytes32() (out [32]byte)
Bytes32 returns little endian encoding
func (Uint256View) Copy ¶ added in v0.2.0
func (v Uint256View) Copy() (View, error)
func (*Uint256View) Decode ¶ added in v0.2.0
func (v *Uint256View) Decode(x []byte) error
func (*Uint256View) Deserialize ¶ added in v0.2.0
func (v *Uint256View) Deserialize(r *codec.DecodingReader) error
func (Uint256View) Encode ¶ added in v0.2.0
func (v Uint256View) Encode() ([]byte, error)
func (Uint256View) FixedLength ¶ added in v0.2.0
func (v Uint256View) FixedLength() uint64
func (Uint256View) HashTreeRoot ¶ added in v0.2.0
func (v Uint256View) HashTreeRoot(h HashFn) Root
func (Uint256View) MarshalJSON ¶ added in v0.2.0
func (v Uint256View) MarshalJSON() ([]byte, error)
func (Uint256View) MarshalText ¶ added in v0.2.0
func (v Uint256View) MarshalText() (out []byte, err error)
func (Uint256View) Serialize ¶ added in v0.2.0
func (v Uint256View) Serialize(w *codec.EncodingWriter) error
func (Uint256View) SetBacking ¶ added in v0.2.0
func (v Uint256View) SetBacking(b Node) error
func (*Uint256View) SetBytes32 ¶ added in v0.2.0
func (v *Uint256View) SetBytes32(data [32]byte)
SetBytes32 sets view from little endian encoding
func (*Uint256View) SetFromBig ¶ added in v0.2.0
func (v *Uint256View) SetFromBig(x *big.Int) (overflow bool)
func (Uint256View) String ¶ added in v0.2.0
func (v Uint256View) String() string
func (Uint256View) Type ¶ added in v0.2.0
func (v Uint256View) Type() TypeDef
func (*Uint256View) UnmarshalJSON ¶ added in v0.2.0
func (v *Uint256View) UnmarshalJSON(b []byte) error
func (*Uint256View) UnmarshalText ¶ added in v0.2.0
func (v *Uint256View) UnmarshalText(b []byte) error
func (Uint256View) ValueByteLength ¶ added in v0.2.0
func (v Uint256View) ValueByteLength() (uint64, error)
type Uint32View ¶
type Uint32View uint32
func (Uint32View) Backing ¶
func (v Uint32View) Backing() Node
func (Uint32View) BackingFromBase ¶
func (v Uint32View) BackingFromBase(base *Root, i uint8) *Root
func (Uint32View) ByteLength ¶ added in v0.1.0
func (v Uint32View) ByteLength() uint64
func (Uint32View) Copy ¶
func (v Uint32View) Copy() (View, error)
func (*Uint32View) Decode ¶ added in v0.1.0
func (v *Uint32View) Decode(x []byte) error
func (*Uint32View) Deserialize ¶ added in v0.1.0
func (v *Uint32View) Deserialize(r *codec.DecodingReader) error
func (Uint32View) Encode ¶ added in v0.1.0
func (v Uint32View) Encode() ([]byte, error)
func (Uint32View) FixedLength ¶ added in v0.1.0
func (v Uint32View) FixedLength() uint64
func (Uint32View) HashTreeRoot ¶
func (v Uint32View) HashTreeRoot(h HashFn) Root
func (Uint32View) MarshalJSON ¶ added in v0.2.0
func (v Uint32View) MarshalJSON() ([]byte, error)
func (Uint32View) MarshalText ¶ added in v0.2.0
func (v Uint32View) MarshalText() (out []byte, err error)
func (Uint32View) Serialize ¶
func (v Uint32View) Serialize(w *codec.EncodingWriter) error
func (Uint32View) SetBacking ¶
func (v Uint32View) SetBacking(b Node) error
func (Uint32View) String ¶ added in v0.1.2
func (v Uint32View) String() string
func (Uint32View) Type ¶
func (v Uint32View) Type() TypeDef
func (*Uint32View) UnmarshalJSON ¶ added in v0.2.0
func (v *Uint32View) UnmarshalJSON(b []byte) error
func (*Uint32View) UnmarshalText ¶ added in v0.2.0
func (v *Uint32View) UnmarshalText(b []byte) error
func (Uint32View) ValueByteLength ¶
func (v Uint32View) ValueByteLength() (uint64, error)
type Uint64View ¶
type Uint64View uint64
func (Uint64View) Backing ¶
func (v Uint64View) Backing() Node
func (Uint64View) BackingFromBase ¶
func (v Uint64View) BackingFromBase(base *Root, i uint8) *Root
func (Uint64View) ByteLength ¶ added in v0.1.0
func (v Uint64View) ByteLength() uint64
func (Uint64View) Copy ¶
func (v Uint64View) Copy() (View, error)
func (*Uint64View) Decode ¶ added in v0.1.0
func (v *Uint64View) Decode(x []byte) error
func (*Uint64View) Deserialize ¶ added in v0.1.0
func (v *Uint64View) Deserialize(r *codec.DecodingReader) error
func (Uint64View) Encode ¶ added in v0.1.0
func (v Uint64View) Encode() ([]byte, error)
func (Uint64View) FixedLength ¶ added in v0.1.0
func (v Uint64View) FixedLength() uint64
func (Uint64View) HashTreeRoot ¶
func (v Uint64View) HashTreeRoot(h HashFn) Root
func (Uint64View) MarshalJSON ¶ added in v0.1.1
func (v Uint64View) MarshalJSON() ([]byte, error)
func (Uint64View) MarshalText ¶ added in v0.2.0
func (v Uint64View) MarshalText() (out []byte, err error)
func (Uint64View) Serialize ¶
func (v Uint64View) Serialize(w *codec.EncodingWriter) error
func (Uint64View) SetBacking ¶
func (v Uint64View) SetBacking(b Node) error
func (Uint64View) String ¶ added in v0.1.2
func (v Uint64View) String() string
func (Uint64View) Type ¶
func (v Uint64View) Type() TypeDef
func (*Uint64View) UnmarshalJSON ¶ added in v0.1.1
func (v *Uint64View) UnmarshalJSON(b []byte) error
func (*Uint64View) UnmarshalText ¶ added in v0.2.0
func (v *Uint64View) UnmarshalText(b []byte) error
func (Uint64View) ValueByteLength ¶
func (v Uint64View) ValueByteLength() (uint64, error)
type Uint8View ¶
type Uint8View uint8
func (Uint8View) BackingFromBase ¶
func (Uint8View) ByteLength ¶ added in v0.1.0
func (*Uint8View) Deserialize ¶ added in v0.1.0
func (v *Uint8View) Deserialize(r *codec.DecodingReader) error
func (Uint8View) FixedLength ¶ added in v0.1.0
func (Uint8View) HashTreeRoot ¶
func (v Uint8View) HashTreeRoot(h HashFn) Root
func (Uint8View) MarshalJSON ¶ added in v0.2.0
func (Uint8View) MarshalText ¶ added in v0.2.0
func (Uint8View) SetBacking ¶
func (*Uint8View) UnmarshalJSON ¶ added in v0.2.0
func (*Uint8View) UnmarshalText ¶ added in v0.2.0
func (Uint8View) ValueByteLength ¶
type UintMeta ¶
type UintMeta uint64
A uint type, identified by its size in bytes.
func (UintMeta) BasicViewFromBacking ¶
func (UintMeta) Default ¶
func (td UintMeta) Default(_ BackingHook) View
func (UintMeta) DefaultNode ¶
func (td UintMeta) DefaultNode() Node
func (UintMeta) Deserialize ¶
func (td UintMeta) Deserialize(dr *codec.DecodingReader) (View, error)
func (UintMeta) IsFixedByteLength ¶
func (UintMeta) MaxByteLength ¶
func (UintMeta) MinByteLength ¶
func (UintMeta) TypeByteLength ¶
func (UintMeta) ViewFromBacking ¶
func (td UintMeta) ViewFromBacking(node Node, _ BackingHook) (View, error)
type UnionTypeDef ¶ added in v0.1.7
type UnionTypeDef struct { ComplexTypeBase // a "None" option is just a nil. Options []TypeDef }
func UnionType ¶ added in v0.1.7
func UnionType(options []TypeDef) *UnionTypeDef
func (*UnionTypeDef) Default ¶ added in v0.1.7
func (td *UnionTypeDef) Default(hook BackingHook) View
func (*UnionTypeDef) DefaultNode ¶ added in v0.1.7
func (td *UnionTypeDef) DefaultNode() Node
func (*UnionTypeDef) Deserialize ¶ added in v0.1.7
func (td *UnionTypeDef) Deserialize(dr *codec.DecodingReader) (View, error)
func (*UnionTypeDef) FromView ¶ added in v0.1.7
func (td *UnionTypeDef) FromView(selector uint8, v View) (*UnionView, error)
func (*UnionTypeDef) New ¶ added in v0.1.7
func (td *UnionTypeDef) New() *UnionView
func (*UnionTypeDef) String ¶ added in v0.1.7
func (td *UnionTypeDef) String() string
func (*UnionTypeDef) TypeRepr ¶ added in v0.1.7
func (td *UnionTypeDef) TypeRepr() string
func (*UnionTypeDef) ViewFromBacking ¶ added in v0.1.7
func (td *UnionTypeDef) ViewFromBacking(node Node, hook BackingHook) (View, error)
type UnionView ¶ added in v0.1.7
type UnionView struct { BackedView *UnionTypeDef }
func (*UnionView) Change ¶ added in v0.1.7
Changes the union selector and value. Does not check the view type. The value may be nil in the Union[None, T...] case.
func (*UnionView) Serialize ¶ added in v0.1.7
func (tv *UnionView) Serialize(w *codec.EncodingWriter) error
func (*UnionView) ValueByteLength ¶ added in v0.1.7
type VectorTypeDef ¶
func VectorType ¶
func VectorType(elemType TypeDef, length uint64) VectorTypeDef
Click to show internal directories.
Click to hide internal directories.