Skip to content

Commit 52232e5

Browse files
committed
document ScannerMessage
1 parent a250537 commit 52232e5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/types.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,19 @@ use alloy::primitives::BlockHash;
44
use tokio::sync::mpsc;
55
use tracing::{info, warn};
66

7+
/// Messages streamed by the scanner to subscribers.
8+
///
9+
/// Each message represents either data (logs), an error, or a notification about the scanner's
10+
/// state or behavior.
711
#[derive(Copy, Debug, Clone)]
812
pub enum ScannerMessage<T: Clone, E: Error + Clone> {
13+
/// Data streamed to the subscriber.
914
Data(T),
15+
16+
/// Error encountered during scanning.
1017
Error(E),
18+
19+
/// Notification about scanner state changes or important events.
1120
Notification(Notification),
1221
}
1322

0 commit comments

Comments
 (0)