Documentation ¶
Index ¶
- func MarshalBool(v bool, bs []byte) (n int)
- func MarshalByte(v byte, bs []byte) (n int)
- func MarshalFloat32(v float32, bs []byte) (n int)
- func MarshalFloat64(v float64, bs []byte) (n int)
- func MarshalInt(v int, bs []byte) (n int)
- func MarshalInt16(v int16, bs []byte) (n int)
- func MarshalInt32(v int32, bs []byte) (n int)
- func MarshalInt64(v int64, bs []byte) (n int)
- func MarshalInt8(v int8, bs []byte) (n int)
- func MarshalString(v string, lenM mus.Marshaller[int], bs []byte) (n int)
- func MarshalUint(v uint, bs []byte) (n int)
- func MarshalUint16(v uint16, bs []byte) (n int)
- func MarshalUint32(v uint32, bs []byte) (n int)
- func MarshalUint64(v uint64, bs []byte) (n int)
- func MarshalUint8(v uint8, bs []byte) (n int)
- func SizeBool(v bool) (n int)
- func SizeByte(v byte) (n int)
- func SizeFloat32(v float32) (n int)
- func SizeFloat64(v float64) (n int)
- func SizeInt(v int) (n int)
- func SizeInt16(v int16) (n int)
- func SizeInt32(v int32) (n int)
- func SizeInt64(v int64) (n int)
- func SizeInt8(v int8) (n int)
- func SizeString(v string, lenS mus.Sizer[int]) (n int)
- func SizeUint(v uint) (n int)
- func SizeUint16(v uint16) (n int)
- func SizeUint32(v uint32) (n int)
- func SizeUint64(v uint64) (n int)
- func SizeUint8(v uint8) (n int)
- func SkipBool(bs []byte) (n int, err error)
- func SkipByte(bs []byte) (n int, err error)
- func SkipFloat32(bs []byte) (n int, err error)
- func SkipFloat64(bs []byte) (n int, err error)
- func SkipInt(bs []byte) (n int, err error)
- func SkipInt16(bs []byte) (n int, err error)
- func SkipInt32(bs []byte) (n int, err error)
- func SkipInt64(bs []byte) (n int, err error)
- func SkipInt8(bs []byte) (n int, err error)
- func SkipString(lenU mus.Unmarshaller[int], bs []byte) (n int, err error)
- func SkipUint(bs []byte) (n int, err error)
- func SkipUint16(bs []byte) (n int, err error)
- func SkipUint32(bs []byte) (n int, err error)
- func SkipUint64(bs []byte) (n int, err error)
- func SkipUint8(bs []byte) (n int, err error)
- func UnmarshalBool(bs []byte) (v bool, n int, err error)
- func UnmarshalByte(bs []byte) (v byte, n int, err error)
- func UnmarshalFloat32(bs []byte) (v float32, n int, err error)
- func UnmarshalFloat64(bs []byte) (v float64, n int, err error)
- func UnmarshalInt(bs []byte) (v int, n int, err error)
- func UnmarshalInt16(bs []byte) (v int16, n int, err error)
- func UnmarshalInt32(bs []byte) (v int32, n int, err error)
- func UnmarshalInt64(bs []byte) (v int64, n int, err error)
- func UnmarshalInt8(bs []byte) (v int8, n int, err error)
- func UnmarshalString(lenU mus.Unmarshaller[int], bs []byte) (v string, n int, err error)
- func UnmarshalUint(bs []byte) (v uint, n int, err error)
- func UnmarshalUint16(bs []byte) (v uint16, n int, err error)
- func UnmarshalUint32(bs []byte) (v uint32, n int, err error)
- func UnmarshalUint64(bs []byte) (v uint64, n int, err error)
- func UnmarshalUint8(bs []byte) (v uint8, n int, err error)
- func UnmarshalValidString(lenU mus.Unmarshaller[int], lenVl com.Validator[int], skip bool, bs []byte) (v string, n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalBool ¶
MarshalBool fills bs with the encoding of a bool value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalByte ¶
MarshalByte fills bs with the encoding (Raw) of a byte value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalFloat32 ¶
MarshalFloat32 fills bs with the encoding (Raw) of a float32 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalFloat64 ¶
MarshalFloat64 fills bs with the encoding (Raw) of a float64 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalInt ¶
MarshalInt fills bs with the encoding (Raw) of a int value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalInt16 ¶
MarshalInt16 fills bs with the encoding (Raw) of a int16 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalInt32 ¶
MarshalInt32 fills bs with the encoding (Raw) of a int32 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalInt64 ¶
MarshalInt64 fills bs with the encoding (Raw) of a int64 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalInt8 ¶
MarshalInt8 fills bs with the encoding (Raw) of a int8 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalString ¶
MarshalString fills bs with the encoding of a string value.
The lenM argument specifies the Marshaller for the string length.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalUint ¶
MarshalUint fills bs with the encoding (Raw) of a uint value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalUint16 ¶
MarshalUint16 fills bs with the encoding (Raw) of a uint16 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalUint32 ¶
MarshalUint32 fills bs with the encoding (Raw) of a uint32 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalUint64 ¶
MarshalUint64 fills bs with the encoding (Raw) of a uint64 value.
Returns the number of used bytes. It will panic if receives too small bs.
func MarshalUint8 ¶
MarshalUint8 fills bs with the encoding (Raw) of a uint8 value.
Returns the number of used bytes. It will panic if receives too small bs.
func SizeFloat32 ¶
SizeFloat32 returns the size of an encoded (Raw) float32 value.
func SizeFloat64 ¶
SizeFloat64 returns the size of an encoded (Raw) float64 value.
func SizeString ¶
SizeString returns the size of an encoded string value.
The lenS argument specifies the Sizer for the string length.
func SizeUint16 ¶
SizeUint16 returns the size of an encoded (Raw) uint16 value.
func SizeUint32 ¶
SizeUint32 returns the size of an encoded (Raw) uint32 value.
func SizeUint64 ¶
SizeUint64 returns the size of an encoded (Raw) uint64 value.
func SkipBool ¶
SkipBool skips an encoded bool value.
Returns the number of skiped bytes and one of the mus.ErrTooSmallByteSlice or com.ErrWrongFormat errors.
func SkipByte ¶
SkipByte skips an encoded (Raw) byte value.
In addition to the number of skipped bytes, it can also return mus.ErrTooSmallByteSlice.
func SkipFloat32 ¶
SkipFloat32 skips an encoded (Raw) float32 value.
In addition to the number of skipped bytes, it can also return mus.ErrTooSmallByteSlice.
func SkipFloat64 ¶
SkipFloat64 skips an encoded (Raw) float64 value.
In addition to the number of skipped bytes, it can also return mus.ErrTooSmallByteSlice.
func SkipInt ¶
SkipInt skips an encoded (Raw) int value.
In addition to the number of skipped bytes, it can also return mus.ErrTooSmallByteSlice.
func SkipInt16 ¶
SkipInt16 skips an encoded (Raw) int16 value.
In addition to the number of skipped bytes, it can also return mus.ErrTooSmallByteSlice.
func SkipInt32 ¶
SkipInt32 skips an encoded (Raw) int32 value.
In addition to the number of skipped bytes, it can also return mus.ErrTooSmallByteSlice.
func SkipInt64 ¶
SkipInt64 skips an encoded (Raw) int64 value.
In addition to the number of skipped bytes, it can also return mus.ErrTooSmallByteSlice.
func SkipInt8 ¶
SkipInt8 skips an encoded (Raw) int8 value.
In addition to the number of skipped bytes, it can also return mus.ErrTooSmallByteSlice.
func SkipString ¶
SkipString skips an encoded string.
The lenU argument specifies the Unmarshaller for the string length.
Returns the number of skiped bytes and one of the mus.ErrTooSmallByteSlice, com.ErrOverflow or mus.ErrNegativeLength errors.
func SkipUint ¶
SkipUint skips an encoded (Raw) uint.
In addition to the number of skipped bytes, it can also return mus.ErrTooSmallByteSlice.
func SkipUint16 ¶
SkipUint16 skips an encoded (Raw) uint16.
In addition to the number of skipped bytes, it can also return mus.ErrTooSmallByteSlice.
func SkipUint32 ¶
SkipUint32 skips an encoded (Raw) uint32.
In addition to the number of skipped bytes, it can also return mus.ErrTooSmallByteSlice.
func SkipUint64 ¶
SkipUint64 skips an encoded (Raw) uint64.
In addition to the number of skipped bytes, it can also return mus.ErrTooSmallByteSlice.
func SkipUint8 ¶
SkipUint8 skips an encoded (Raw) uint8.
In addition to the number of skipped bytes, it can also return mus.ErrTooSmallByteSlice.
func UnmarshalBool ¶
UnmarshalBool parses an encoded bool value from bs.
In addition to the bool, returns the number of used bytes and one of the mus.ErrTooSmallByteSlice or com.ErrWrongFormat errors.
func UnmarshalByte ¶
UnmarshalByte parses an encoded (Raw) byte value from bs.
In addition to the byte value and the number of used bytes, it can also return mus.ErrTooSmallByteSlice.
func UnmarshalFloat32 ¶
UnmarshalFloat32 parses an encoded (Raw) float32 value from bs.
In addition to the float32 value and the number of used bytes, it can also return mus.ErrTooSmallByteSlice.
func UnmarshalFloat64 ¶
UnmarshalFloat64 parses an encoded (Raw) float64 value from bs.
In addition to the float64 value and the number of used bytes, it can also return mus.ErrTooSmallByteSlice.
func UnmarshalInt ¶
UnmarshalInt parses an encoded (Raw) int value from bs.
In addition to the int value and the number of used bytes, it can also return mus.ErrTooSmallByteSlice.
func UnmarshalInt16 ¶
UnmarshalInt16 parses an encoded (Raw) int16 value from bs.
In addition to the int16 value and the number of used bytes, it can also return mus.ErrTooSmallByteSlice.
func UnmarshalInt32 ¶
UnmarshalInt32 parses an encoded (Raw) int32 value from bs.
In addition to the int32 value and the number of used bytes, it can also return mus.ErrTooSmallByteSlice.
func UnmarshalInt64 ¶
UnmarshalInt64 parses an encoded (Raw) int64 value from bs.
In addition to the int64 value and the number of used bytes, it can also return mus.ErrTooSmallByteSlice.
func UnmarshalInt8 ¶
UnmarshalInt8 parses an encoded (Raw) int8 value from bs.
In addition to the int8 value and the number of used bytes, it can also return mus.ErrTooSmallByteSlice.
func UnmarshalString ¶
UnmarshalString parses an encoded string value from bs.
The lenU argument specifies the Unmarshaller for the string length.
In addition to the string value, returns the number of used bytes and one of the mus.ErrTooSmallByteSlice, com.ErrOverflow or com.ErrNegativeLength errors.
func UnmarshalUint ¶
UnmarshalUint parses an encoded (Raw) uint value from bs.
In addition to the uint value and the number of used bytes, it can also return mus.ErrTooSmallByteSlice.
func UnmarshalUint16 ¶
UnmarshalUint16 parses an encoded (Raw) uint16 value from bs.
In addition to the uint16 value and the number of used bytes, it can also return mus.ErrTooSmallByteSlice.
func UnmarshalUint32 ¶
UnmarshalUint32 parses an encoded (Raw) uint32 value from bs.
In addition to the uint32 value and the number of used bytes, it can also return mus.ErrTooSmallByteSlice.
func UnmarshalUint64 ¶
UnmarshalUint64 parses an encoded (Raw) uint64 value from bs.
In addition to the uint64 value and the number of used bytes, it can also return mus.ErrTooSmallByteSlice.
func UnmarshalUint8 ¶
UnmarshalUint8 parses an encoded (Raw) uint8 value from bs.
In addition to the uint8 value and the number of used bytes, it can also return mus.ErrTooSmallByteSlice.
func UnmarshalValidString ¶
func UnmarshalValidString(lenU mus.Unmarshaller[int], lenVl com.Validator[int], skip bool, bs []byte) (v string, n int, err error)
UnmarshalValidString parses an encoded valid string value from bs.
The lenU argument specifies the Unmarshaller for the string length. The lenVl argument specifies the string length Validator. If it returns an error and skip == true UnmarshalValidString skips the remaining bytes of the string.
In addition to the string value, returns the number of used bytes and one of the mus.ErrTooSmallByteSlice, com.ErrOverflow, com.ErrNegativeLength or Validator errors.
Types ¶
This section is empty.