pub trait Batch { type Error; // Required methods fn begin(self) -> Result<(), Self::Error>; fn end(self) -> Result<(), Self::Error>; }