Skip to main content

workflow_serializer/
lib.rs

1//! Declarative helpers for storing and loading values with
2//! [Borsh](https://borsh.io/): serialization macros and length-prefixed payload
3//! buffers used to persist and exchange data across the workflow-rs crates.
4
5/// Declarative macros for storing and loading items via Borsh and [`serializer::Serializer`].
6pub mod macros;
7/// Helper `payload::Payload` wrappers that length-prefix serialized data into a byte buffer.
8pub mod payload;
9/// Type aliases for the standard library I/O error and result types used throughout the crate.
10pub mod result;
11/// The [`serializer::Serializer`] and [`serializer::Deserializer`] traits and their implementations.
12pub mod serializer;
13/// Unit tests exercising the serialization traits and macros.
14pub mod tests;
15
16/// Re-exports of the most commonly used traits, macros, and Borsh items.
17pub mod prelude {
18    pub use crate::serializer::{Deserializer, Serializable, Serializer};
19    pub use crate::{deserialize, load, payload, reader, serialize, store, version, writer};
20    pub use borsh::{BorshDeserialize, BorshSerialize};
21}
22
23pub use borsh;