package
0.2501.0
Repository: https://github.com/oasisprotocol/oasis-core.git
Documentation: pkg.go.dev

# Functions

GetVersion returns the version of a versioned serializable data structure, if any.
Marshal serializes a given type into a CBOR byte vector.
MustUnmarshal deserializes a CBOR byte vector into a given type.
NewDecoder creates a new CBOR decoder.
NewDecoderRPC creates a new CBOR decoder with relaxed decoding restrictions.
NewEncoder creates a new CBOR encoder.
NewMessageCodec constructs a new Message encoder/decoder.
NewVersioned creates a new Versioned structure with the specified version.
Unmarshal deserializes a CBOR byte vector into a given type.
UnmarshalRPC deserializes a CBOR byte vector into a given type.
UnmarshalTrusted deserializes a CBOR byte vector into a given type.

# Variables

ErrInvalidVersion is the error returned when a versioned serialized blob is either missing, or has an invalid version.

# Structs

MessageCodec is a length-prefixed Message encoder/decoder.
MessageReader is a reader wrapper that decodes CBOR-encoded Message structures.
MessageWriter is a writer wrapper that encodes Messages structures to CBOR.
Versioned is a generic versioned serializable data structure.

# Type aliases

Marshaler is the interface implemented by types that can marshal themselves into valid CBOR.
RawMessage is a raw encoded CBOR value.
Unmarshaler is the interface implemented by types that wish to unmarshal CBOR data themselves.