Documentation ¶
Index ¶
- func BoolMarshal(field int, buf []byte, v bool) int
- func BoolSize(field int, v bool) int
- func BytesMarshal(field int, buf, v []byte) int
- func BytesSize(field int, v []byte) int
- func EnumMarshal(field int, buf []byte, v int32) int
- func EnumSize(field int, v int32) int
- func Fixed32Marshal(field int, buf []byte, v uint32) int
- func Fixed32Size(fNum int, v uint32) int
- func Fixed64Marshal(field int, buf []byte, v uint64) int
- func Fixed64Size(fNum int, v uint64) int
- func Float64Marshal(field int, buf []byte, v float64) int
- func Float64Size(fNum int, v float64) int
- func Int32Marshal(field int, buf []byte, v int32) int
- func Int32Size(field int, v int32) int
- func Int64Marshal(field int, buf []byte, v int64) int
- func Int64Size(field int, v int64) int
- func NestedStructureMarshal[T any, M ptrStableMarshaler[T]](field int64, buf []byte, v M) int
- func NestedStructureMarshalUnchecked[T stableMarshaler](field int64, buf []byte, v T) int
- func NestedStructureSetMarshalData[T any, M setMarshalData[T]](field int64, parentData []byte, v M) int
- func NestedStructureSize[T any, M ptrStableSizer[T]](field int64, v M) (size int)
- func NestedStructureSizeUnchecked[T stableSizer](field int64, v T) int
- func RepeatedBytesMarshal(field int, buf []byte, v [][]byte) int
- func RepeatedBytesSize(field int, v [][]byte) (size int)
- func RepeatedInt32Marshal(field int, buf []byte, v []int32) int
- func RepeatedInt32Size(field int, v []int32) (size, arraySize int)
- func RepeatedInt64Marshal(field int, buf []byte, v []int64) int
- func RepeatedInt64Size(field int, v []int64) (size, arraySize int)
- func RepeatedStringMarshal(field int, buf []byte, v []string) int
- func RepeatedStringSize(field int, v []string) (size int)
- func RepeatedUInt32Marshal(field int, buf []byte, v []uint32) int
- func RepeatedUInt32Size(field int, v []uint32) (size, arraySize int)
- func RepeatedUInt64Marshal(field int, buf []byte, v []uint64) int
- func RepeatedUInt64Size(field int, v []uint64) (size, arraySize int)
- func StringMarshal(field int, buf []byte, v string) int
- func StringSize(field int, v string) int
- func UInt32Marshal(field int, buf []byte, v uint32) int
- func UInt32Size(field int, v uint32) int
- func UInt64Marshal(field int, buf []byte, v uint64) int
- func UInt64Size(field int, v uint64) int
- func VarUIntSize(x uint64) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesMarshal ¶
func Fixed32Marshal ¶
Fixed32Marshal encodes uint32 value to Protocol Buffers fixed32 field with specified number, and writes it to specified buffer. Returns number of bytes written.
Panics if the buffer is undersized.
func Fixed32Size ¶
Fixed32Size returns number of bytes required to encode uint32 value to Protocol Buffers fixed32 field with specified number.
func Fixed64Size ¶
func Float64Size ¶
func NestedStructureMarshal ¶
func NestedStructureSetMarshalData ¶
func NestedStructureSetMarshalData[T any, M setMarshalData[T]](field int64, parentData []byte, v M) int
NestedStructureSetMarshalData calculates offset for field in parentData and calls SetMarshalData for nested structure.
Returns marshalled data length of nested structure.
func NestedStructureSize ¶
func RepeatedBytesSize ¶
func RepeatedInt32Size ¶
func RepeatedInt64Size ¶
func RepeatedStringSize ¶
func RepeatedUInt32Size ¶
func RepeatedUInt64Size ¶
func StringSize ¶
func UInt32Size ¶
func UInt64Size ¶
func VarUIntSize ¶
VarUIntSize returns length of varint byte sequence for uint64 value 'x'.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.