Documentation ¶
Overview ¶
Package handlers for builtin types.
Index ¶
- func Chill()
- type Auto
- type Bool
- type Bytes
- type BytesArray
- func (b BytesArray) Decoding(r *renderer.Go, dst, src string) bool
- func (b BytesArray) Encoding(r *renderer.Go, dst, src string)
- func (b BytesArray) Len() int
- func (b BytesArray) LenExpr(r *renderer.Go, src string) string
- func (b BytesArray) Name(r *renderer.Go) string
- func (b BytesArray) Pre(r *renderer.Go, src string)
- type Float
- type Int
- type SliceInt
- func (i *SliceInt) Decoding(r *renderer.Go, dst, src string) bool
- func (i *SliceInt) Encoding(r *renderer.Go, dst, src string)
- func (i *SliceInt) Len() int
- func (i *SliceInt) LenExpr(r *renderer.Go, src string) string
- func (i *SliceInt) Name(*renderer.Go) string
- func (i *SliceInt) Pre(r *renderer.Go, src string)
- type SliceUint
- func (i *SliceUint) Decoding(r *renderer.Go, dst, src string) bool
- func (i *SliceUint) Encoding(r *renderer.Go, dst, src string)
- func (i *SliceUint) Len() int
- func (i *SliceUint) LenExpr(r *renderer.Go, src string) string
- func (i *SliceUint) Name(*renderer.Go) string
- func (i *SliceUint) Pre(r *renderer.Go, src string)
- type SlicesUniform
- func (s *SlicesUniform) Decoding(r *renderer.Go, dst, src string) bool
- func (s *SlicesUniform) Encoding(r *renderer.Go, dst, src string)
- func (s *SlicesUniform) Len() int
- func (s *SlicesUniform) LenExpr(r *renderer.Go, src string) string
- func (s *SlicesUniform) Name(r *renderer.Go) string
- func (s *SlicesUniform) Pre(r *renderer.Go, src string)
- type SlicesVariadic
- func (s *SlicesVariadic) Decoding(r *renderer.Go, dst, src string) bool
- func (s *SlicesVariadic) Encoding(r *renderer.Go, dst, src string)
- func (s *SlicesVariadic) Len() int
- func (s *SlicesVariadic) LenExpr(r *renderer.Go, src string) string
- func (s *SlicesVariadic) Name(r *renderer.Go) string
- func (s *SlicesVariadic) Pre(r *renderer.Go, src string)
- type StringHandler
- func (b *StringHandler) Decoding(r *renderer.Go, dst, src string) bool
- func (b *StringHandler) Encoding(r *renderer.Go, dst, src string)
- func (b *StringHandler) Len() int
- func (b *StringHandler) LenExpr(r *renderer.Go, src string) string
- func (b *StringHandler) Name(*renderer.Go) string
- func (b *StringHandler) Pre(r *renderer.Go, src string)
- type Type
- type Uint
- type Uvarint
- func (v *Uvarint) Decoding(r *renderer.Go, dst, src string) bool
- func (v *Uvarint) Encoding(r *renderer.Go, dst, src string)
- func (v *Uvarint) Len() int
- func (v *Uvarint) LenExpr(r *renderer.Go, src string) string
- func (v *Uvarint) Name(r *renderer.Go) string
- func (v *Uvarint) Pre(r *renderer.Go, src string)
- type Varint
- func (v *Varint) Decoding(r *renderer.Go, dst, src string) bool
- func (v *Varint) Encoding(r *renderer.Go, dst, src string)
- func (v *Varint) Len() int
- func (v *Varint) LenExpr(r *renderer.Go, src string) string
- func (v *Varint) Name(r *renderer.Go) string
- func (v *Varint) Pre(r *renderer.Go, src string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Auto ¶
type Auto struct {
// contains filtered or unexported fields
}
Auto handles types that passes TypeImplementsEncoder and TypeImplementsDecoder checks.
type Bool ¶
type Bool struct{}
Bool handlers bool type.
type Bytes ¶
type Bytes struct {
// contains filtered or unexported fields
}
Bytes handles []byte type.
type BytesArray ¶
type BytesArray int
BytesArray handles [N]byte
func (BytesArray) Decoding ¶
func (b BytesArray) Decoding(r *renderer.Go, dst, src string) bool
Decoding to implement TypeHandler.
func (BytesArray) Encoding ¶
func (b BytesArray) Encoding(r *renderer.Go, dst, src string)
Encoding to implement TypeHandler.
func (BytesArray) LenExpr ¶
func (b BytesArray) LenExpr(r *renderer.Go, src string) string
LenExpr to implement TypeHandler.
type Float ¶
type Float int
Float handles floatX.
type Int ¶
type Int int
Int handles intXXX.
type SliceInt ¶ added in v0.2.0
type SliceInt struct {
// contains filtered or unexported fields
}
func NewSliceInt16 ¶ added in v0.2.0
func NewSliceInt16() *SliceInt
func NewSliceInt32 ¶ added in v0.2.0
func NewSliceInt32() *SliceInt
func NewSliceInt64 ¶ added in v0.2.0
func NewSliceInt64() *SliceInt
type SliceUint ¶ added in v0.2.0
type SliceUint struct {
// contains filtered or unexported fields
}
func NewSliceUint16 ¶ added in v0.2.0
func NewSliceUint16() *SliceUint
func NewSliceUint32 ¶ added in v0.2.0
func NewSliceUint32() *SliceUint
func NewSliceUint64 ¶ added in v0.2.0
func NewSliceUint64() *SliceUint
type SlicesUniform ¶ added in v0.5.0
type SlicesUniform struct {
// contains filtered or unexported fields
}
SlicesUniform []T types support for supported types T with fixed length encoding.
func NewSlicesUniform ¶ added in v0.5.0
func NewSlicesUniform(handler Type, itemType types.Type) *SlicesUniform
NewSlicesUniform construct SliceUniform handler.
func (*SlicesUniform) Decoding ¶ added in v0.5.0
func (s *SlicesUniform) Decoding(r *renderer.Go, dst, src string) bool
Decoding to implement TypeHandler.
func (*SlicesUniform) Encoding ¶ added in v0.5.0
func (s *SlicesUniform) Encoding(r *renderer.Go, dst, src string)
Encoding to implement TypeHandler.
func (*SlicesUniform) Len ¶ added in v0.5.0
func (s *SlicesUniform) Len() int
Len to implement TypeHandler.
func (*SlicesUniform) LenExpr ¶ added in v0.5.0
func (s *SlicesUniform) LenExpr(r *renderer.Go, src string) string
LenExpr to implement TypeHandler.
type SlicesVariadic ¶ added in v0.5.0
type SlicesVariadic struct {
// contains filtered or unexported fields
}
SlicesVariadic []T types support for supported types T with variable lengths encoding.
func NewSlicesVariadic ¶ added in v0.5.0
func NewSlicesVariadic(handler Type, itemType types.Type) *SlicesVariadic
NewSlicesVariadic constructs SlicesVariadic handler.
func (*SlicesVariadic) Decoding ¶ added in v0.5.0
func (s *SlicesVariadic) Decoding(r *renderer.Go, dst, src string) bool
Decoding to implement TypeHandler.
func (*SlicesVariadic) Encoding ¶ added in v0.5.0
func (s *SlicesVariadic) Encoding(r *renderer.Go, dst, src string)
Encoding to implement TypeHandler.
func (*SlicesVariadic) Len ¶ added in v0.5.0
func (s *SlicesVariadic) Len() int
Len to implement TypeHandler.
func (*SlicesVariadic) LenExpr ¶ added in v0.5.0
func (s *SlicesVariadic) LenExpr(r *renderer.Go, src string) string
LenExpr to implement TypeHandler.
type StringHandler ¶
type StringHandler struct {
// contains filtered or unexported fields
}
StringHandler handles string type.
func (*StringHandler) Decoding ¶
func (b *StringHandler) Decoding(r *renderer.Go, dst, src string) bool
Decoding to satisfy Handler.
func (*StringHandler) Encoding ¶
func (b *StringHandler) Encoding(r *renderer.Go, dst, src string)
Encoding to satisfy Handler.
func (*StringHandler) LenExpr ¶
func (b *StringHandler) LenExpr(r *renderer.Go, src string) string
LenExpr to satisfy Handler.
type Type ¶
type Type interface { Name(r *renderer.Go) string Pre(r *renderer.Go, src string) Len() int LenExpr(r *renderer.Go, src string) string Encoding(r *renderer.Go, dst, src string) Decoding(r *renderer.Go, dst, src string) bool }
Type a doubler of fenneg.TypeHandler to avoid cyclic imports.
type Uint ¶
type Uint int
Uint handles uintXXX.
type Uvarint ¶
type Uvarint struct {
// contains filtered or unexported fields
}
Uvarint handles uintXXX with uleb128 zigzag encoding/decoding.
func ArchUvarint ¶ added in v0.4.0
func ArchUvarint() *Uvarint
ArchUvarint handles uint with uleb128 zigzag encoding/decoding.
func Uvarint16 ¶
func Uvarint16() *Uvarint
Uvarint16 handles uint16 with uleb128 zigzag encoding/decoding.
func Uvarint32 ¶
func Uvarint32() *Uvarint
Uvarint32 handles uint32 with uleb128 zigzag encoding/decoding.
func Uvarint64 ¶
func Uvarint64() *Uvarint
Uvarint64 handles uint64 with uleb128 zigzag encoding/decoding.
type Varint ¶
type Varint struct {
// contains filtered or unexported fields
}
Varint handles intXXX with uleb128 zigzag encoding/decoding.
func ArchVarint ¶ added in v0.4.0
func ArchVarint() *Varint
ArchVarint handles int with uleb128 zigzag encoding/decoding.
func Varint16 ¶
func Varint16() *Varint
Varint16 handles int16 with uleb128 zigzag encoding/decoding.
func Varint32 ¶
func Varint32() *Varint
Varint32 handles int32 with uleb128 zigzag encoding/decoding.
func Varint64 ¶
func Varint64() *Varint
Varint64 handles int64 with uleb128 zigzag encoding/decoding.
Source Files ¶
- chill.go
- doc.go
- handler_auto.go
- handler_bool.go
- handler_bytes.go
- handler_bytes_array.go
- handler_floats.go
- handler_ints.go
- handler_slice_ints.go
- handler_slice_uints.go
- handler_slices_uniform.go
- handler_slices_variadic.go
- handler_str.go
- handler_uints.go
- handler_uvarints.go
- handler_varints.go
- snippets.go
- type.go