Skip to main content

Crate workflow_serializer

Crate workflow_serializer 

Source
Expand description

Declarative helpers for storing and loading values with Borsh: serialization macros and length-prefixed payload buffers used to persist and exchange data across the workflow-rs crates.

Re-exports§

pub use borsh;

Modules§

macros
Declarative macros for storing and loading items via Borsh and serializer::Serializer.
payload
Helper payload::Payload wrappers that length-prefix serialized data into a byte buffer.
prelude
Re-exports of the most commonly used traits, macros, and Borsh items.
result
Type aliases for the standard library I/O error and result types used throughout the crate.
serializer
The serializer::Serializer and serializer::Deserializer traits and their implementations.
tests
Unit tests exercising the serialization traits and macros.

Macros§

deserialize
Load item using Serializer deserialization. crate::serializer::Serializer is meant to provide custom serialization over Borsh that can be used to store additional metadata such as struct version.
load
Load item using Borsh deserialization
payload
Create Payload struct - a #repr[transparent] struct wrapping Cursor<Vec<u8>>. This struct acts as a helper for storing and loading items into a Vec<u8> buffer.
reader
Consume a crate::payload::Payload and produce a Cursor<Vec<u8>> reader over its bytes.
serialize
Store item using Serializer serialization. crate::serializer::Serializer is meant to provide custom serialization over Borsh that can be used to store additional metadata such as struct version.
store
Store item using Borsh serialization
version
Construct a crate::payload::Version from major and minor version numbers.
writer
Borrow a crate::payload::Payload as a mutable Cursor<Vec<u8>> writer.