Skip to content

Commit ad20814

Browse files
authored
docs: add missing documentation for serde_bincode_compat::ExExNotification (#20236)
1 parent abfb6d3 commit ad20814

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

crates/exex/types/src/notification.rs

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,33 @@ pub(super) mod serde_bincode_compat {
9595
/// notification: ExExNotification<N>,
9696
/// }
9797
/// ```
98+
///
99+
/// This enum mirrors [`super::ExExNotification`] but uses borrowed [`Chain`] types
100+
/// instead of `Arc<Chain>` for bincode compatibility.
98101
#[derive(Debug, Serialize, Deserialize)]
99-
#[expect(missing_docs)]
100102
#[serde(bound = "")]
101103
#[expect(clippy::large_enum_variant)]
102104
pub enum ExExNotification<'a, N>
103105
where
104106
N: NodePrimitives,
105107
{
106-
ChainCommitted { new: Chain<'a, N> },
107-
ChainReorged { old: Chain<'a, N>, new: Chain<'a, N> },
108-
ChainReverted { old: Chain<'a, N> },
108+
/// Chain got committed without a reorg, and only the new chain is returned.
109+
ChainCommitted {
110+
/// The new chain after commit.
111+
new: Chain<'a, N>,
112+
},
113+
/// Chain got reorged, and both the old and the new chains are returned.
114+
ChainReorged {
115+
/// The old chain before reorg.
116+
old: Chain<'a, N>,
117+
/// The new chain after reorg.
118+
new: Chain<'a, N>,
119+
},
120+
/// Chain got reverted, and only the old chain is returned.
121+
ChainReverted {
122+
/// The old chain before reversion.
123+
old: Chain<'a, N>,
124+
},
109125
}
110126

111127
impl<'a, N> From<&'a super::ExExNotification<N>> for ExExNotification<'a, N>

0 commit comments

Comments
 (0)