Documentation ¶
Index ¶
- Variables
- func IntSize(name string) int
- func RegisterDecoder(typ ref.Type, dec DecodeFunc)
- func Unmarshal(rd io.Reader, v any) error
- func ValueSize(v ref.Type) (int, error)
- func WriteVarString[E SizedUnsigned](w io.Writer, str string) error
- type DecodeFunc
- type Decoder
- func (dec *Decoder) Decode(v any) (err error)
- func (dec *Decoder) DecodeValue(v reflect.Value) error
- func (dec *Decoder) Int16() (v int16)
- func (dec *Decoder) Int32() (v int32)
- func (dec *Decoder) Int64() (v int64)
- func (dec *Decoder) Int8() (v int8)
- func (dec *Decoder) Pos() int64
- func (dec *Decoder) Read(p []byte) (n int, err error)
- func (dec *Decoder) Skip(n int64) error
- func (dec *Decoder) Uint(n int) int
- func (dec *Decoder) Uint16() (v uint16)
- func (dec *Decoder) Uint32() (v uint32)
- func (dec *Decoder) Uint64() (v uint64)
- func (dec *Decoder) Uint8() (v uint8)
- type DecodingError
- type Encoder
- type SizedInteger
- type SizedSigned
- type SizedUnsigned
- type Tag
- type Type
- type Unmarshaler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMissingTag will be returned if a required tag is missing // e.g. for a field with the type string we need one ErrMissingTag = errors.New("missing field tag") ErrMissingSize = errors.New("missing size") )
View Source
var ( ErrUnknownTagOption = errors.New("unknown tag option") ErrInvalidTagOption = errors.New("invalid tag option") )
Functions ¶
func RegisterDecoder ¶
func RegisterDecoder(typ ref.Type, dec DecodeFunc)
func WriteVarString ¶
func WriteVarString[E SizedUnsigned](w io.Writer, str string) error
Types ¶
type DecodingError ¶
func (*DecodingError) Error ¶
func (err *DecodingError) Error() string
func (*DecodingError) Unwrap ¶
func (err *DecodingError) Unwrap() error
type SizedInteger ¶
type SizedInteger interface { SizedSigned | SizedUnsigned }
type Tag ¶
type Tag struct { Size expr.Expr If expr.Expr Ptrs expr.Expr Vars map[string]expr.Expr // contains filtered or unexported fields }
func (*Tag) IsDynArray ¶
func (*Tag) IsDynString ¶
func (*Tag) IsHoleyArray ¶
type Unmarshaler ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.