1//! Consensus-critical serialization.
2//!
3//! This module contains four traits: `ZcashSerialize` and `ZcashDeserialize`,
4//! analogs of the Serde `Serialize` and `Deserialize` traits but intended for
5//! consensus-critical Zcash serialization formats, and `WriteZcashExt` and
6//! `ReadZcashExt`, extension traits for `io::Read` and `io::Write` with utility functions
7//! for reading and writing data (e.g., the Bitcoin variable-integer format).
89mod compact_size;
10mod constraint;
11mod date_time;
12mod error;
13mod read_zcash;
14mod write_zcash;
15mod zcash_deserialize;
16mod zcash_serialize;
1718pub mod sha256d;
1920pub(crate) mod serde_helpers;
2122#[cfg(any(test, feature = "proptest-impl"))]
23pub mod arbitrary;
2425#[cfg(test)]
26pub mod tests;
2728pub use compact_size::{CompactSize64, CompactSizeMessage};
29pub use constraint::AtLeastOne;
30pub use date_time::{DateTime32, Duration32};
31pub use error::SerializationError;
32pub use read_zcash::ReadZcashExt;
33pub use write_zcash::WriteZcashExt;
34pub use zcash_deserialize::{
35 zcash_deserialize_bytes_external_count, zcash_deserialize_external_count,
36 zcash_deserialize_string_external_count, TrustedPreallocate, ZcashDeserialize,
37 ZcashDeserializeInto,
38};
39pub use zcash_serialize::{
40 zcash_serialize_bytes, zcash_serialize_bytes_external_count, zcash_serialize_empty_list,
41 zcash_serialize_external_count, FakeWriter, ZcashSerialize, MAX_PROTOCOL_MESSAGE_LEN,
42};