Documentation ¶
Index ¶
- Variables
- func Decode(buf []byte, value Decodable) error
- func DecodeByteSlice(w io.Reader) ([]byte, int, error)
- func DecodeCompact16(w io.Reader) (uint16, int, error)
- func DecodeFrom(r io.Reader, value Decodable) (int, error)
- func DecodeSlice[V any, H scale.DecodablePtr[V]](buf []byte) ([]V, error)
- func DecodeStringSlice(w io.Reader) ([]string, int, error)
- func Encode(value Encodable) ([]byte, error)
- func EncodeByteSlice(w io.Writer, value []byte) (int, error)
- func EncodeCompact16(w io.Writer, value uint16) (int, error)
- func EncodeSlice[V any, H scale.EncodablePtr[V]](value []V) ([]byte, error)
- func EncodeStringSlice(w io.Writer, value []string) (int, error)
- func EncodeTo(w io.Writer, value Encodable) (int, error)
- func MustDecode(buf []byte, value Decodable)
- func MustEncode(value Encodable) []byte
- func MustEncodeTo(w io.Writer, value Encodable)
- type Decodable
- type Encodable
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrShortRead = errors.New("decode from buffer: not all bytes were consumed")
Functions ¶
func DecodeByteSlice ¶
DecodeByteSlice decodes []string from a buffer.
func DecodeCompact16 ¶
DecodeCompact16 decodes uint16 from a buffer.
func DecodeFrom ¶
DecodeFrom decodes a value using data from a reader stream.
func DecodeSlice ¶
DecodeSlice decodes slice from a buffer.
func DecodeStringSlice ¶
DecodeStringSlice decodes []string from a buffer.
func EncodeByteSlice ¶
EncodeByteSlice encodes []string to a buffer.
func EncodeCompact16 ¶
EncodeCompact16 encodes uint16 to a buffer.
func EncodeSlice ¶
EncodeSlice encodes slice to a buffer.
func EncodeStringSlice ¶
EncodeStringSlice encodes []string to a buffer.
func MustDecode ¶
func MustEncode ¶
func MustEncodeTo ¶ added in v1.1.4
Types ¶
Click to show internal directories.
Click to hide internal directories.