Documentation
¶
Overview ¶
Package binwire implements bounded, canonical primitives for generated typed format codecs. It has no reflection or dynamic serialization.
Index ¶
- Constants
- Variables
- type Reader
- func (r *Reader) Allocate(size uint64)
- func (r *Reader) Bool() bool
- func (r *Reader) Count(maximum int, minimumBytes, itemAllocation uint64) (int, bool)
- func (r *Reader) Done() error
- func (r *Reader) Err() error
- func (r *Reader) F32() float32
- func (r *Reader) F64() float64
- func (r *Reader) I32() int
- func (r *Reader) Raw(size int) []byte
- func (r *Reader) Remaining() int
- func (r *Reader) SkipString(maximum int)
- func (r *Reader) String(maximum int) string
- func (r *Reader) StringIn(maximum int, choices ...string) bool
- func (r *Reader) U8() uint8
- func (r *Reader) U16() uint16
- func (r *Reader) U32() uint32
- func (r *Reader) U64() uint64
- type Writer
- func (w *Writer) Bool(v bool)
- func (w *Writer) Bytes() ([]byte, error)
- func (w *Writer) Count(length int, absent bool, maximum int)
- func (w *Writer) Err() error
- func (w *Writer) F32(v float32)
- func (w *Writer) F64(v float64)
- func (w *Writer) I32(v int)
- func (w *Writer) Raw(value []byte)
- func (w *Writer) String(v string, maximum int)
- func (w *Writer) U8(v uint8)
- func (w *Writer) U16(v uint16)
- func (w *Writer) U32(v uint32)
- func (w *Writer) U64(v uint64)
Constants ¶
View Source
const AllocationLimit = 32 * 1024 * 1024
View Source
const HeaderSize = 16
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) Raw ¶ added in v0.0.14
Raw borrows an exact bounded byte range. Callers must copy before publishing decoded ownership, after the complete input has passed their preflight.
func (*Reader) Remaining ¶ added in v0.0.14
Remaining reports the unconsumed bounded payload, or zero after a read error.
func (*Reader) SkipString ¶
Click to show internal directories.
Click to hide internal directories.