package
0.0.0-20240603153513-85a4060560ea
Repository: https://github.com/adamcolton/luce.git
Documentation: pkg.go.dev
# Packages
Package rye is a helper for writing serializing and deserializing logic.
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
RegisterTypes is a helper to register multiple types in one call.
WrapPrefixer takes a ReflectTypePrefixer and wraps it with logic to add PrefixInterfaceType there by fulfilling TypePrefixer.
# Structs
PrefixDeserializer handles both deserializing the type and the data.
PrefixSerializer combines a Prefixer and a Serializer to create a TypeSerializer.
# Interfaces
Deserializer takes an interface and a serialization of the underlying type and populates the interface from the data.
Detyper takes in serialized data and returns the type of the data and the rest of the data (minus the type information).
InterfaceDeserializer is what is provided by the json and gob libraries, the ability to populate an interface from a byte slice.
InterfaceTypePrefixer writes the type of the interface to slice.
ReflectTypePrefixer writes a reflect.Type to slice.
Serializer takes an interface and returns the serialization as a byte slice.
TypeDeserializer can infer the type from the message.
TypePrefixer combines both TypePrefixing techniques.
TypeRegistrar is generally required for automatic deserialization.
TypeSerializer takes an interface and returns the serialization as a byte slice that includes the type data.
# Type aliases
ReaderDeserializer serializes the provided interface to the Reader.
WriterSerializer serializes the provided interface to the Writer.