Module wire

Source
Expand description

Pyth Wire Format

Pyth uses a custom wire format when moving data between programs and chains. This module provides the serialization and deserialization logic for this format as well as definitions of data structures used in the PythNet ecosystem.

See the ser submodule for a description of the Pyth Wire format.

Modules§

array
By default, serde does not know how to parse fixed length arrays of sizes that aren’t common (I.E: 32) Here we provide a module that can be used to serialize arrays that relies on const generics.
v1

Structs§

Deserializer
PrefixedVec
PrefixedVec allows overriding the default u8 size of the length prefix for a Vec.
Serializer
A type for Pyth’s common serialization format. Note that a ByteOrder type param is required as we serialize in both big and little endian depending on different use-cases.

Enums§

DeserializerError
SerializerError

Functions§

from_slice
Deserialize a Pyth wire-format buffer into a type.
to_vec
to_writer