Documentation ¶
Overview ¶
Package plenccodec provides the core Codecs for plenc.
You shouldn't need to interact with this package directly unless you're building your own custom codecs.
The exception to this is the Descriptor endpoint on a Codec. This is a serialisable description that allows you to decode plenc data without the type that the data was encoded from.
Index ¶
- type BQTimestampCodec
- func (c BQTimestampCodec) Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte
- func (c BQTimestampCodec) Descriptor() Descriptor
- func (BQTimestampCodec) New() unsafe.Pointer
- func (BQTimestampCodec) Omit(ptr unsafe.Pointer) bool
- func (c BQTimestampCodec) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
- type BaseSliceWrapper
- type BoolCodec
- func (c BoolCodec) Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte
- func (c BoolCodec) Descriptor() Descriptor
- func (c BoolCodec) New() unsafe.Pointer
- func (c BoolCodec) Omit(ptr unsafe.Pointer) bool
- func (BoolCodec) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
- func (c BoolCodec) Size(ptr unsafe.Pointer, tag []byte) int
- func (c BoolCodec) WireType() plenccore.WireType
- type BytesCodec
- func (c BytesCodec) Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte
- func (BytesCodec) Descriptor() Descriptor
- func (c BytesCodec) New() unsafe.Pointer
- func (c BytesCodec) Omit(ptr unsafe.Pointer) bool
- func (BytesCodec) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
- func (c BytesCodec) Size(ptr unsafe.Pointer, tag []byte) int
- func (c BytesCodec) WireType() plenccore.WireType
- type Codec
- type CodecBuilder
- type CodecRegistry
- type Descriptor
- type FieldType
- type FlatIntCodec
- type Float32Codec
- func (c Float32Codec) Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte
- func (c Float32Codec) Descriptor() Descriptor
- func (c Float32Codec) New() unsafe.Pointer
- func (c Float32Codec) Omit(ptr unsafe.Pointer) bool
- func (Float32Codec) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
- func (c Float32Codec) Size(ptr unsafe.Pointer, tag []byte) int
- func (c Float32Codec) WireType() plenccore.WireType
- type Float64Codec
- func (c Float64Codec) Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte
- func (c Float64Codec) Descriptor() Descriptor
- func (c Float64Codec) New() unsafe.Pointer
- func (c Float64Codec) Omit(ptr unsafe.Pointer) bool
- func (Float64Codec) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
- func (c Float64Codec) Size(ptr unsafe.Pointer, tag []byte) int
- func (c Float64Codec) WireType() plenccore.WireType
- type IntCodec
- func (c IntCodec[T]) Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte
- func (c IntCodec[T]) Descriptor() Descriptor
- func (c IntCodec[T]) New() unsafe.Pointer
- func (c IntCodec[T]) Omit(ptr unsafe.Pointer) bool
- func (IntCodec[T]) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
- func (c IntCodec[T]) Size(ptr unsafe.Pointer, tag []byte) int
- func (c IntCodec[T]) WireType() plenccore.WireType
- type InternedStringCodec
- type Interner
- type JSONArrayCodec
- func (c JSONArrayCodec) Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte
- func (c JSONArrayCodec) Descriptor() Descriptor
- func (c JSONArrayCodec) New() unsafe.Pointer
- func (c JSONArrayCodec) Omit(ptr unsafe.Pointer) bool
- func (c JSONArrayCodec) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
- func (c JSONArrayCodec) Size(ptr unsafe.Pointer, tag []byte) int
- func (c JSONArrayCodec) WireType() plenccore.WireType
- type JSONMapCodec
- func (c JSONMapCodec) Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte
- func (c JSONMapCodec) Descriptor() Descriptor
- func (c JSONMapCodec) New() unsafe.Pointer
- func (JSONMapCodec) Omit(ptr unsafe.Pointer) bool
- func (c JSONMapCodec) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
- func (c JSONMapCodec) Size(ptr unsafe.Pointer, tag []byte) int
- func (c JSONMapCodec) WireType() plenccore.WireType
- type JSONOutput
- func (j *JSONOutput) Bool(v bool)
- func (j *JSONOutput) Done() []byte
- func (j *JSONOutput) EndArray()
- func (j *JSONOutput) EndObject()
- func (j *JSONOutput) Float32(v float32)
- func (j *JSONOutput) Float64(v float64)
- func (j *JSONOutput) Int64(v int64)
- func (j *JSONOutput) NameField(name string)
- func (j *JSONOutput) Raw(v string)
- func (j *JSONOutput) Reset()
- func (j *JSONOutput) StartArray()
- func (j *JSONOutput) StartObject()
- func (j *JSONOutput) String(v string)
- func (j *JSONOutput) Time(t time.Time)
- func (j *JSONOutput) Uint64(v uint64)
- type LogicalType
- type MapCodec
- func (c *MapCodec) Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte
- func (c *MapCodec) Descriptor() Descriptor
- func (c *MapCodec) New() unsafe.Pointer
- func (c *MapCodec) Omit(ptr unsafe.Pointer) bool
- func (c *MapCodec) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
- func (c *MapCodec) Size(ptr unsafe.Pointer, tag []byte) int
- func (c *MapCodec) WireType() plenccore.WireType
- type Outputter
- type PointerWrapper
- func (p PointerWrapper) Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte
- func (p PointerWrapper) Descriptor() Descriptor
- func (p PointerWrapper) New() unsafe.Pointer
- func (p PointerWrapper) Omit(ptr unsafe.Pointer) bool
- func (p PointerWrapper) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
- func (p PointerWrapper) Size(ptr unsafe.Pointer, tag []byte) int
- func (p PointerWrapper) WireType() plenccore.WireType
- type ProtoMapCodec
- func (c ProtoMapCodec) Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte
- func (c ProtoMapCodec) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
- func (c ProtoMapCodec) Size(ptr unsafe.Pointer, tag []byte) (size int)
- func (c ProtoMapCodec) WireType() plenccore.WireType
- type ProtoSliceWrapper
- type StringCodec
- func (c StringCodec) Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte
- func (StringCodec) Descriptor() Descriptor
- func (StringCodec) New() unsafe.Pointer
- func (StringCodec) Omit(ptr unsafe.Pointer) bool
- func (StringCodec) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
- func (c StringCodec) Size(ptr unsafe.Pointer, tag []byte) int
- func (StringCodec) WireType() plenccore.WireType
- func (c StringCodec) WithInterning() Codec
- type StructCodec
- func (c *StructCodec) Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte
- func (c *StructCodec) Descriptor() Descriptor
- func (c *StructCodec) New() unsafe.Pointer
- func (c *StructCodec) Omit(ptr unsafe.Pointer) bool
- func (c *StructCodec) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
- func (c *StructCodec) Size(ptr unsafe.Pointer, tag []byte) int
- func (c *StructCodec) WireType() plenccore.WireType
- type TimeCodec
- func (c TimeCodec) Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte
- func (tc TimeCodec) Descriptor() Descriptor
- func (TimeCodec) New() unsafe.Pointer
- func (TimeCodec) Omit(ptr unsafe.Pointer) bool
- func (tc TimeCodec) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
- func (c TimeCodec) Size(ptr unsafe.Pointer, tag []byte) int
- func (tc TimeCodec) WireType() plenccore.WireType
- type TimeCompatCodec
- type UintCodec
- func (c UintCodec[T]) Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte
- func (c UintCodec[T]) Descriptor() Descriptor
- func (c UintCodec[T]) New() unsafe.Pointer
- func (c UintCodec[T]) Omit(ptr unsafe.Pointer) bool
- func (UintCodec[T]) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
- func (c UintCodec[T]) Size(ptr unsafe.Pointer, tag []byte) int
- func (c UintCodec[T]) WireType() plenccore.WireType
- type WTFixedSliceWrapper
- type WTLengthSliceWrapper
- func (c WTLengthSliceWrapper) Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte
- func (c WTLengthSliceWrapper) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
- func (c WTLengthSliceWrapper) Size(ptr unsafe.Pointer, tag []byte) int
- func (c WTLengthSliceWrapper) WireType() plenccore.WireType
- type WTVarIntSliceWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BQTimestampCodec ¶ added in v0.0.13
type BQTimestampCodec struct { FlatIntCodec[uint64] }
BQTimestampStruct encodes a time.Time as a flat (not zigzag) int64 of microseconds since the Epoch. This is how the BigQuery write API expects a timestamp to be encoded
func (BQTimestampCodec) Descriptor ¶ added in v0.0.14
func (c BQTimestampCodec) Descriptor() Descriptor
func (BQTimestampCodec) New ¶ added in v0.0.13
func (BQTimestampCodec) New() unsafe.Pointer
type BaseSliceWrapper ¶
func (BaseSliceWrapper) Descriptor ¶
func (c BaseSliceWrapper) Descriptor() Descriptor
func (BaseSliceWrapper) New ¶
func (c BaseSliceWrapper) New() unsafe.Pointer
func (BaseSliceWrapper) WireType ¶
func (c BaseSliceWrapper) WireType() plenccore.WireType
type BoolCodec ¶
type BoolCodec struct{}
BoolCodec is a codec for a bool
func (BoolCodec) Descriptor ¶
func (c BoolCodec) Descriptor() Descriptor
type BytesCodec ¶
type BytesCodec struct{}
BytesCodec is a codec for a byte slice
func (BytesCodec) Descriptor ¶
func (BytesCodec) Descriptor() Descriptor
func (BytesCodec) New ¶
func (c BytesCodec) New() unsafe.Pointer
New creates a pointer to a new bool
func (BytesCodec) Omit ¶
func (c BytesCodec) Omit(ptr unsafe.Pointer) bool
Omit indicates whether this field should be omitted
func (BytesCodec) WireType ¶
func (c BytesCodec) WireType() plenccore.WireType
WireType returns the wire type used to encode this type
type Codec ¶
type Codec interface { Omit(ptr unsafe.Pointer) bool Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error) New() unsafe.Pointer WireType() plenccore.WireType // Descriptor returns a descriptor for the type correspondng to the Codec. // The descriptor can be used to interpret plenc data without access to the // original type. The descriptor can also be serialised (either as JSON or // plenc), so can be stored or communicated with another system Descriptor() Descriptor // Size returns the size of the encoded data including the tag and // for WTLength types the varint encoded length of the data. If the tag is // nil then it is not included in the size and neither is the length for // WTLength types Size(ptr unsafe.Pointer, tag []byte) int // Append appends the encoded data including the tag and for WTLength // types the varint encoded length of the data. If the tag is nil then it is // not included in the data and neither is the length for WTLength types Append(data []byte, ptr unsafe.Pointer, tag []byte) []byte }
Codec is what you implement to encode / decode a type. Note that codecs are separate from the types they encode, and that they are registered with the system via RegisterCodec.
It isn't normally necessary to build a codec for a struct. Codecs for structs are generated automatically when plenc first sees them and then are re-used for the life of the program.
func BuildMapCodec ¶
func BuildMapCodec(p CodecBuilder, registry CodecRegistry, typ reflect.Type, tag string) (Codec, error)
func BuildStructCodec ¶
func BuildStructCodec(p CodecBuilder, registry CodecRegistry, typ reflect.Type, tag string) (Codec, error)
type CodecBuilder ¶ added in v0.0.5
type CodecBuilder interface { // CodecForTypeRegistry builds a new codec for the requested type, // consulting registry for any existing codecs needed CodecForTypeRegistry(registry CodecRegistry, typ reflect.Type, tag string) (Codec, error) }
CodecBuilder either builds a new codec for a type, or finds an existing codec
type CodecRegistry ¶ added in v0.0.5
type CodecRegistry interface { // Load loads the codec from the registry. It returns nil if no codec exists Load(typ reflect.Type, tag string) Codec // StoreOrSwap adds the codec to the registry. It may return a different // codec if the codec has been built on another goroutine StoreOrSwap(typ reflect.Type, tag string, c Codec) Codec }
CodecRegistry is a repository of pre-existing Codecs
type Descriptor ¶
type Descriptor struct { // Index is the plenc index of this field Index int `plenc:"1"` // Name is the name of the field Name string `plenc:"2"` // Type is the type of the field Type FieldType `plenc:"3"` // TypeName is used for struct types and is the name of the struct. TypeName string `plenc:"5"` // Elements is valid for FieldTypeSlice, FieldTypeStruct & FieldTypeMap. For // FieldTypeSlice we expect one entry that describes the elements of the // slice. For FieldTypeStruct we expect an entry for each field in the // struct. For FieldTypeMap we expect two entries. The first is for the key // type and the second is for the map type Elements []Descriptor `plenc:"4"` // ExplicitPresence is set if the field has a mechanism to distinguish when // it is not present. So either a pointer type or something from the null // package. If this is not set then a missing value indicates the zero // value, not a null or nil entry. ExplicitPresence bool `plenc:"6"` // The logical type of the field. This is used to indicate if the field has // any special meaning - e.g. if a long or string indicates a timestamp. LogicalType LogicalType `plenc:"7"` }
Descriptor describes how a type is plenc-encoded. It contains enough information to decode plenc data marshalled from the described type.
type FieldType ¶
type FieldType int
const ( FieldTypeInt FieldType = iota FieldTypeUint FieldTypeFloat32 FieldTypeFloat64 FieldTypeString FieldTypeSlice FieldTypeStruct FieldTypeBool FieldTypeTime FieldTypeJSONObject FieldTypeJSONArray // Not zig-zag encoded, but expected to be signed. Don't use if negative // numbers are likely. FieldTypeFlatInt )
type FlatIntCodec ¶ added in v0.0.13
FlatIntCodec is for signed ints that aren't zig-zag encoded. Use this with ints that are almost always positive.
func (FlatIntCodec[T]) Descriptor ¶ added in v0.0.13
func (c FlatIntCodec[T]) Descriptor() Descriptor
type Float32Codec ¶
type Float32Codec struct{}
Float32Codec is a coddec for a float32
func (Float32Codec) Descriptor ¶
func (c Float32Codec) Descriptor() Descriptor
func (Float32Codec) New ¶
func (c Float32Codec) New() unsafe.Pointer
New creates a pointer to a new float32
func (Float32Codec) Omit ¶
func (c Float32Codec) Omit(ptr unsafe.Pointer) bool
Omit indicates whether this field should be omitted
func (Float32Codec) WireType ¶
func (c Float32Codec) WireType() plenccore.WireType
WireType returns the wire type used to encode this type
type Float64Codec ¶
type Float64Codec struct{}
Float64Codec is a coddec for a float64
func (Float64Codec) Descriptor ¶
func (c Float64Codec) Descriptor() Descriptor
func (Float64Codec) New ¶
func (c Float64Codec) New() unsafe.Pointer
New creates a pointer to a new float64
func (Float64Codec) Omit ¶
func (c Float64Codec) Omit(ptr unsafe.Pointer) bool
Omit indicates whether this field should be omitted
func (Float64Codec) WireType ¶
func (c Float64Codec) WireType() plenccore.WireType
WireType returns the wire type used to encode this type
type IntCodec ¶
IntCodec is a coddec for an int
func (IntCodec[T]) Descriptor ¶
func (c IntCodec[T]) Descriptor() Descriptor
type InternedStringCodec ¶
type InternedStringCodec struct { sync.Mutex StringCodec // contains filtered or unexported fields }
type JSONArrayCodec ¶
type JSONArrayCodec struct{}
JSONArrayCodec is for serialising JSON arrays encoded as []any
func (JSONArrayCodec) Descriptor ¶
func (c JSONArrayCodec) Descriptor() Descriptor
func (JSONArrayCodec) New ¶
func (c JSONArrayCodec) New() unsafe.Pointer
func (JSONArrayCodec) WireType ¶
func (c JSONArrayCodec) WireType() plenccore.WireType
type JSONMapCodec ¶
type JSONMapCodec struct{}
JSONMapCodec is for serialising JSON maps encoded in Go as map[string]any. To use this codec you must register it for use with map[string]any or a named map[string]any type
func (JSONMapCodec) Descriptor ¶
func (c JSONMapCodec) Descriptor() Descriptor
func (JSONMapCodec) New ¶
func (c JSONMapCodec) New() unsafe.Pointer
func (JSONMapCodec) WireType ¶
func (c JSONMapCodec) WireType() plenccore.WireType
type JSONOutput ¶
type JSONOutput struct {
// contains filtered or unexported fields
}
JSONOutput converts Descriptor output to JSON.
func (*JSONOutput) Bool ¶
func (j *JSONOutput) Bool(v bool)
func (*JSONOutput) Done ¶
func (j *JSONOutput) Done() []byte
func (*JSONOutput) EndArray ¶
func (j *JSONOutput) EndArray()
func (*JSONOutput) EndObject ¶
func (j *JSONOutput) EndObject()
func (*JSONOutput) Float32 ¶
func (j *JSONOutput) Float32(v float32)
func (*JSONOutput) Float64 ¶
func (j *JSONOutput) Float64(v float64)
func (*JSONOutput) Int64 ¶
func (j *JSONOutput) Int64(v int64)
func (*JSONOutput) NameField ¶
func (j *JSONOutput) NameField(name string)
func (*JSONOutput) Raw ¶
func (j *JSONOutput) Raw(v string)
func (*JSONOutput) Reset ¶
func (j *JSONOutput) Reset()
func (*JSONOutput) StartArray ¶
func (j *JSONOutput) StartArray()
func (*JSONOutput) StartObject ¶
func (j *JSONOutput) StartObject()
func (*JSONOutput) String ¶
func (j *JSONOutput) String(v string)
func (*JSONOutput) Time ¶
func (j *JSONOutput) Time(t time.Time)
func (*JSONOutput) Uint64 ¶
func (j *JSONOutput) Uint64(v uint64)
type LogicalType ¶ added in v0.0.14
type LogicalType int
const ( LogicalTypeNone LogicalType = iota LogicalTypeTimestamp LogicalTypeDate LogicalTypeTime LogicalTypeMap LogicalTypeMapEntry )
type MapCodec ¶
type MapCodec struct {
// contains filtered or unexported fields
}
MapCodec is a codec for maps. We treat it as a slice of structs with the key and value as the fields in the structs.
func (*MapCodec) Descriptor ¶
func (c *MapCodec) Descriptor() Descriptor
type Outputter ¶
type Outputter interface { StartObject() EndObject() StartArray() EndArray() NameField(name string) Int64(v int64) Uint64(v uint64) Float64(v float64) Float32(v float32) String(v string) Bool(v bool) Time(t time.Time) Raw(v string) }
Outputter is an interface that a Descriptor uses to turn plenc data to some other output
type PointerWrapper ¶
type PointerWrapper struct {
Underlying Codec
}
PointerWrapper wraps a codec so it can be used for a pointer to the type
func (PointerWrapper) Descriptor ¶
func (p PointerWrapper) Descriptor() Descriptor
func (PointerWrapper) New ¶
func (p PointerWrapper) New() unsafe.Pointer
func (PointerWrapper) WireType ¶
func (p PointerWrapper) WireType() plenccore.WireType
type ProtoMapCodec ¶ added in v0.0.12
type ProtoMapCodec struct {
*MapCodec
}
func (ProtoMapCodec) Size ¶ added in v0.0.12
func (c ProtoMapCodec) Size(ptr unsafe.Pointer, tag []byte) (size int)
func (ProtoMapCodec) WireType ¶ added in v0.0.12
func (c ProtoMapCodec) WireType() plenccore.WireType
type ProtoSliceWrapper ¶ added in v0.0.11
type ProtoSliceWrapper struct {
BaseSliceWrapper
}
ProtoSliceWrapper is for encoding slices of WTLength encoded objects how protobuf does it. When writing the elements of the slice are simply repeated. When reading each element is treated separately and appended to the slice.
Note this does not work outside of a struct as we don't add tags and therefore the length of each element is not known
func (ProtoSliceWrapper) Append ¶ added in v0.0.11
Append appends the data for this slice, including repeated tags and lengths for each element
type StringCodec ¶
type StringCodec struct{}
StringCodec is a codec for an string
func (StringCodec) Descriptor ¶
func (StringCodec) Descriptor() Descriptor
func (StringCodec) New ¶
func (StringCodec) New() unsafe.Pointer
New creates a pointer to a new string header
func (StringCodec) Omit ¶
func (StringCodec) Omit(ptr unsafe.Pointer) bool
Omit indicates whether this field should be omitted
func (StringCodec) WireType ¶
func (StringCodec) WireType() plenccore.WireType
WireType returns the wire type used to encode this type
func (StringCodec) WithInterning ¶
func (c StringCodec) WithInterning() Codec
type StructCodec ¶
type StructCodec struct {
// contains filtered or unexported fields
}
func (*StructCodec) Descriptor ¶
func (c *StructCodec) Descriptor() Descriptor
func (*StructCodec) New ¶
func (c *StructCodec) New() unsafe.Pointer
func (*StructCodec) WireType ¶
func (c *StructCodec) WireType() plenccore.WireType
type TimeCodec ¶
type TimeCodec struct{}
TimeCodec is a codec for Time Note that this is not compatible with google.protobuf.Timestamp. The structure is the same, but they don't use zigzag encoding for the fields. They still do allow negative values though
func (TimeCodec) Descriptor ¶
func (tc TimeCodec) Descriptor() Descriptor
type TimeCompatCodec ¶ added in v0.0.10
type TimeCompatCodec struct {
TimeCodec
}
type UintCodec ¶
UintCodec is a coddec for a uint
func (UintCodec[T]) Descriptor ¶
func (c UintCodec[T]) Descriptor() Descriptor
type WTFixedSliceWrapper ¶
type WTFixedSliceWrapper struct {
BaseSliceWrapper
}
WTFixedSliceWrapper is a codec for a type that's encoded as a fixed 32 or 64 byte value (i.e. float32 or float64)
type WTLengthSliceWrapper ¶
type WTLengthSliceWrapper struct {
BaseSliceWrapper
}
WTLengthSliceWrapper is a codec for a slice of a type that's encoded using the WTLength wire type. It uses the WTSlice wire type for the slice itself.
func (WTLengthSliceWrapper) Read ¶
func (c WTLengthSliceWrapper) Read(data []byte, ptr unsafe.Pointer, wt plenccore.WireType) (n int, err error)
Read decodes a slice. It assumes the WTLength tag has already been decoded and that the data slice is the corect size for the slice
func (WTLengthSliceWrapper) Size ¶
func (c WTLengthSliceWrapper) Size(ptr unsafe.Pointer, tag []byte) int
func (WTLengthSliceWrapper) WireType ¶
func (c WTLengthSliceWrapper) WireType() plenccore.WireType
type WTVarIntSliceWrapper ¶
type WTVarIntSliceWrapper struct {
BaseSliceWrapper
}
WTVarIntSliceWrapper is a codec for a type encoded using the WTVarInt wire type.