Module codec

Module codec 

Source
Expand description

Types for serializing high-level Cairo types into field elements and vice versa.

Structs§

Error
Error type for any encoding/decoding operations.

Traits§

Decode
Any type that can be deserialized from a series of Felts. This trait corresponds to the deserialize function of the Cairo Serde trait.
Encode
Any type that can be serialized into a series of Felts. This trait corresponds to the serialize function of the Cairo Serde trait.
FeltWriter
Any type where Felts can be written into. This would typically be Vec<Felt>, but can also be something like a stateful hasher.

Derive Macros§

Decode
Derives the Decode trait.
Encode
Derives the Encode trait.