Documentation
¶
Overview ¶
Package postcard encodes and decodes the Rust postcard wire format.
Index ¶
- Variables
- func Marshal(v any) ([]byte, error)
- func Unmarshal(data []byte, v any) error
- type Decoder
- func (d *Decoder) Bool() (bool, error)
- func (d *Decoder) BytesValue() ([]byte, error)
- func (d *Decoder) Decode(v any) error
- func (d *Decoder) Done() bool
- func (d *Decoder) Int() (int64, error)
- func (d *Decoder) RawBytes(n int) ([]byte, error)
- func (d *Decoder) String() (string, error)
- func (d *Decoder) Uint() (uint64, error)
- type DecoderFrom
- type Encoder
- type EncoderTo
- type Marshaler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTrailingBytes is returned when Unmarshal does not consume all input. ErrTrailingBytes = errors.New("postcard: trailing bytes") )
Functions ¶
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder incrementally decodes postcard values.
func (*Decoder) BytesValue ¶
BytesValue decodes a postcard byte sequence.
type DecoderFrom ¶
DecoderFrom is implemented by values that decode themselves from d.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder incrementally encodes postcard values.
func (*Encoder) BytesValue ¶
BytesValue appends b as a postcard byte sequence.
Click to show internal directories.
Click to hide internal directories.