use crate::types::PipelineResult;
use alloc::boxed::Box;
use async_trait::async_trait;
use kona_protocol::{Batch, BlockInfo, L2BlockInfo};
mod batch_stream;
pub use batch_stream::{BatchStream, BatchStreamProvider};
mod batch_queue;
pub use batch_queue::BatchQueue;
mod batch_validator;
pub use batch_validator::BatchValidator;
mod batch_provider;
pub use batch_provider::BatchProvider;
#[async_trait]
pub trait NextBatchProvider {
async fn next_batch(
&mut self,
parent: L2BlockInfo,
l1_origins: &[BlockInfo],
) -> PipelineResult<Batch>;
fn span_buffer_size(&self) -> usize;
fn flush(&mut self);
}