reth_primitives_traits/
lib.rs1#![doc(
21 html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
22 html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
23 issue_tracker_base_url = "https://github.com/SeismicSystems/seismic-reth/issues/"
24)]
25#![cfg_attr(not(test), warn(unused_crate_dependencies))]
26#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
27#![cfg_attr(not(feature = "std"), no_std)]
28
29#[macro_use]
30extern crate alloc;
31
32pub mod constants;
34pub use constants::gas_units::{format_gas, format_gas_throughput};
35
36pub mod account;
38pub use account::{Account, Bytecode};
39
40pub mod receipt;
41pub use receipt::{FullReceipt, Receipt};
42
43pub mod transaction;
44pub use transaction::{
45 execute::FillTxEnv,
46 signed::{FullSignedTx, SignedTransaction},
47 FullTransaction, Transaction,
48};
49
50pub mod block;
51pub use block::{
52 body::{BlockBody, FullBlockBody},
53 header::{BlockHeader, FullBlockHeader},
54 Block, FullBlock,
55};
56
57mod encoded;
58mod withdrawal;
59pub use encoded::WithEncoded;
60
61pub mod crypto;
62
63mod error;
64pub use error::{GotExpected, GotExpectedBoxed};
65
66mod log;
67pub use alloy_primitives::{logs_bloom, Log, LogData};
68
69mod storage;
70pub use storage::StorageEntry;
71
72pub mod header;
74#[cfg(any(test, feature = "arbitrary", feature = "test-utils"))]
75pub use header::test_utils;
76pub use header::{Header, HeaderError, SealedHeader};
77
78#[cfg(feature = "serde-bincode-compat")]
86pub mod serde_bincode_compat;
87
88pub mod size;
90pub use size::InMemorySize;
91
92pub mod node;
94pub use node::{BodyTy, FullNodePrimitives, HeaderTy, NodePrimitives, ReceiptTy};
95
96#[cfg(feature = "serde")]
98pub trait MaybeSerde: serde::Serialize + for<'de> serde::Deserialize<'de> {}
99#[cfg(not(feature = "serde"))]
102pub trait MaybeSerde {}
103
104#[cfg(feature = "serde")]
105impl<T> MaybeSerde for T where T: serde::Serialize + for<'de> serde::Deserialize<'de> {}
106#[cfg(not(feature = "serde"))]
107impl<T> MaybeSerde for T {}
108
109#[cfg(feature = "reth-codec")]
112pub trait MaybeCompact: reth_codecs::Compact {}
113#[cfg(not(feature = "reth-codec"))]
116pub trait MaybeCompact {}
117
118#[cfg(feature = "reth-codec")]
119impl<T> MaybeCompact for T where T: reth_codecs::Compact {}
120#[cfg(not(feature = "reth-codec"))]
121impl<T> MaybeCompact for T {}
122
123#[cfg(feature = "serde-bincode-compat")]
125pub trait MaybeSerdeBincodeCompat: crate::serde_bincode_compat::SerdeBincodeCompat {}
126#[cfg(not(feature = "serde-bincode-compat"))]
129pub trait MaybeSerdeBincodeCompat {}
130
131#[cfg(feature = "serde-bincode-compat")]
132impl<T> MaybeSerdeBincodeCompat for T where T: crate::serde_bincode_compat::SerdeBincodeCompat {}
133#[cfg(not(feature = "serde-bincode-compat"))]
134impl<T> MaybeSerdeBincodeCompat for T {}