co_primitives/types/streamable.rs
1// SPDX-License-Identifier: AGPL-3.0-only
2// Copyright (C) 2026 1io BRANDGUARDIAN GmbH
3
4use crate::BlockStorage;
5use futures::Stream;
6
7pub trait Streamable<S>
8where
9 S: BlockStorage + Clone + 'static,
10{
11 type Item;
12 type Stream: Stream<Item = Self::Item> + 'static;
13
14 fn stream(&self, storage: S) -> Self::Stream;
15}