Documentation
¶
Index ¶
- Constants
- Variables
- type CallTableFieldsIterator
- type CallTableSerializationEnvelope
- func (env *CallTableSerializationEnvelope) EstimateSize(fieldSizes []int) int
- func (env *CallTableSerializationEnvelope) FromBytes(maxExpectedFields uint32, inputBytes []byte) (*CallTableSerializationEnvelope, []byte, error)
- func (env *CallTableSerializationEnvelope) StartConsuming() (*CallTableFieldsIterator, error)
- type CallTableSerializationEnvelopeBuilder
- type Field
- type FieldFromBytesDecoder
- type Fields
Constants ¶
View Source
const FieldSerializedLength = 6
Variables ¶
View Source
var ( ErrFormatting = errors.New("formatting error") ErrEarlyEndOfStream = errors.New("early end of stream") )
Functions ¶
This section is empty.
Types ¶
type CallTableFieldsIterator ¶
type CallTableFieldsIterator struct { IndexInFieldsVec int ExpectedSize int Field *Field Bytes []byte Parent *CallTableSerializationEnvelope }
func DeserializeAndMaybeNext ¶
func DeserializeAndMaybeNext[T any, D encoding.FromBytes[T]](it *CallTableFieldsIterator, decoder D) (T, *CallTableFieldsIterator, error)
DeserializeAndMaybeNext deserializes the current field and returns the next iterator if available
func (*CallTableFieldsIterator) VerifyIndex ¶
func (it *CallTableFieldsIterator) VerifyIndex(expectedIndex uint16) error
VerifyIndex verifies the index of the current field
type CallTableSerializationEnvelope ¶
func (*CallTableSerializationEnvelope) EstimateSize ¶
func (env *CallTableSerializationEnvelope) EstimateSize(fieldSizes []int) int
func (*CallTableSerializationEnvelope) FromBytes ¶
func (env *CallTableSerializationEnvelope) FromBytes(maxExpectedFields uint32, inputBytes []byte) (*CallTableSerializationEnvelope, []byte, error)
FromBytes deserializes the envelope
func (*CallTableSerializationEnvelope) StartConsuming ¶
func (env *CallTableSerializationEnvelope) StartConsuming() (*CallTableFieldsIterator, error)
type CallTableSerializationEnvelopeBuilder ¶
type CallTableSerializationEnvelopeBuilder struct {
// contains filtered or unexported fields
}
CallTableSerializationEnvelopeBuilder is used to construct a serialization envelope.
func NewCallTableSerializationEnvelopeBuilder ¶
func NewCallTableSerializationEnvelopeBuilder(expectedPayloadSizes []int) (*CallTableSerializationEnvelopeBuilder, error)
func (*CallTableSerializationEnvelopeBuilder) AddField ¶
func (b *CallTableSerializationEnvelopeBuilder) AddField(fieldIndex uint16, value []byte) error
func (*CallTableSerializationEnvelopeBuilder) BinaryPayloadBytes ¶
func (b *CallTableSerializationEnvelopeBuilder) BinaryPayloadBytes() ([]byte, error)
type Field ¶
Field represents an individual field in the serialization envelope.
func (Field) SerializedLength ¶
type FieldFromBytesDecoder ¶
type FieldFromBytesDecoder struct{}
type Fields ¶
func (*Fields) SerializedLength ¶
func (*Fields) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.