1#![allow(clippy::comparison_chain)]
2#![deny(clippy::unwrap_used)]
3
4pub mod builder;
5pub mod cow;
6pub mod error;
7pub mod interface;
8pub mod interface_iter;
9pub mod iter;
10pub mod leaf;
11pub mod level_iter;
12pub mod list;
13pub mod mem;
14pub mod packed_leaf;
15mod repeat;
16pub mod serde;
17mod tests;
18pub mod tree;
19pub mod update_map;
20pub mod utils;
21pub mod vector;
22
23#[cfg(feature = "context_deserialize")]
24mod context_deserialize;
25
26pub use cow::Cow;
27pub use error::Error;
28pub use interface::ImmList;
29pub use leaf::Leaf;
30pub use list::List;
31pub use packed_leaf::PackedLeaf;
32pub use tree::Tree;
33pub use triomphe::Arc;
34pub use update_map::UpdateMap;
35pub use vector::Vector;
36
37use ssz::{Decode, Encode};
38use tree_hash::TreeHash;
39
40pub const MAX_TREE_DEPTH: usize = u64::BITS as usize - 1;
44
45pub const MAX_TREE_LENGTH: u64 = 1 << MAX_TREE_DEPTH;
46
47#[cfg(feature = "debug")]
48pub trait Value: Encode + Decode + TreeHash + PartialEq + Clone + std::fmt::Debug {}
49
50#[cfg(feature = "debug")]
51impl<T> Value for T where T: Encode + Decode + TreeHash + PartialEq + Clone + std::fmt::Debug {}
52
53#[cfg(not(feature = "debug"))]
54pub trait Value: Encode + Decode + TreeHash + PartialEq + Clone {}
55
56#[cfg(not(feature = "debug"))]
57impl<T> Value for T where T: Encode + Decode + TreeHash + PartialEq + Clone {}